mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2009-05-07 06:49 am

[dw-free] Add the standard presentation options to zesty

[commit: http://hg.dwscoalition.org/dw-free/rev/d2b46396b7cc]

http://bugs.dwscoalition.org/show_bug.cgi?id=1072

Add some presentation options to Zesty in the wizard.

Patch by [personal profile] afuna.

Files modified:
  • bin/test-pay
  • bin/upgrading/s2layers/zesty/layout.s2
--------------------------------------------------------------------------------
diff -r 1a48f68a8811 -r d2b46396b7cc bin/test-pay
--- a/bin/test-pay	Thu May 07 01:47:03 2009 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use lib "$ENV{LJHOME}/cgi-bin";
-
-require 'ljlang.pl';
-require 'ljlib.pl';
-
-use Data::Dumper;
-
-if ( $ARGV[0] eq 'get_paid_status' ) {
-    my $u = $ARGV[1] > 0 ? LJ::load_userid( $ARGV[1] ) : LJ::load_user( $ARGV[1] )
-        or die "user not found\n";
-    print "Status for: $u->{user}($u->{userid})\n";
-
-    my $stat = DW::Pay::get_paid_status( $u );
-    if ( defined $stat ) {
-        print "\taccount type = " . DW::Pay::type_name( $stat->{typeid} ) . "\n";
-        if ( $stat->{expiresin} > 0 ) {
-            print "\texpires in " . LJ::ago_text( $stat->{expiresin} ) . "\n";
-        } else {
-            if ( $stat->{permanent} ) {
-                print "\taccount is PERMANENT\n";
-            } else {
-                print "\texpired " . LJ::ago_text( -$stat->{expiresin} ) . "\n";
-            }
-        }
-    } else {
-        print "\taccount is free and has never been a paid account.\n";
-    }
-
-} elsif ( $ARGV[0] eq 'pp_get_checkout_url' ) {
-    my $url = DW::Pay::pp_get_checkout_url( map { $_ eq 'undef' ? undef : $_ } @ARGV[1..6] );
-    if ( defined $url ) {
-        print "Success: $url\n";
-    } else {
-        print "Failure: " . DW::Pay::error_text() . "\n";
-    }
-
-} elsif ( $ARGV[0] eq 'get_payment_details' ) {
-    my $details = DW::Pay::get_payment_details( $ARGV[1] );
-    if ( defined $details ) {
-        print "Payment ID:   $details->{paymentid}\n";
-        print "Payment Date: " . LJ::mysql_time( $details->{paydate} ) . "\n";
-        if ( $details->{pp_token} ) {
-            print "PayPal Token: $details->{pp_token}\n";
-        }
-        if ( $details->{from_userid} ) {
-            my $fu = LJ::load_userid( $details->{from_userid} );
-            print "From User:    $fu->{user}($fu->{userid})\n";
-        } else {
-            print "From User:    not from a user\n";
-        }
-        if ( $details->{target_userid} ) {
-            my $tu = LJ::load_userid( $details->{target_userid} );
-            print "Target User:  $tu->{user}($tu->{userid}) by id\n";
-        } elsif ( $details->{target_username} ) {
-            my $tu = LJ::load_user( $details->{target_username} );
-            if ( $tu ) {
-                print "Target User:  $tu->{user}($tu->{userid}) by name, exists\n";
-            } else {
-                print "Target User:  '$details->{target_username}' by name, does not exist\n";
-            }
-        }
-        print "Payment For:  " . DW::Pay::type_name( $details->{typeid} ) . "\n";
-        if ( $details->{duration} == 99 ) {
-            print "Duration:     PERMANENT\n";
-        } else {
-            print "Duration:     $details->{duration} months\n";
-        }
-        print "Amount:       \$" . sprintf( '%0.2f', $details->{amount} )  . "\n";
-        print "Status:       $details->{status}\n"; 
-        
-    } else {
-        print "Failure: " . DW::Pay::error_text() . "\n";
-    }
-
-} elsif ( $ARGV[0] eq 'pp_get_paymentid_from_token' ) {
-    my $payid = DW::Pay::pp_get_paymentid_from_token( $ARGV[1] );
-    if ( defined $payid ) {
-        print "Success: paymentid = $payid\n";
-    } else {
-        print "Failure: error? = " . DW::Pay::error_text() . "\n";
-    }
-
-} elsif ( $ARGV[0] eq 'pp_get_order_details' ) {
-    my $res = DW::Pay::pp_get_order_details( $ARGV[1] );
-    if ( defined $res ) {
-        print "TEMP: " . Dumper($res);
-    } else {
-        print "Failure: error? = " . DW::Pay::error_text() . "\n";
-    }
-
-} elsif ( $ARGV[0] eq 'pp_confirm_order' ) {
-    my $res = DW::Pay::pp_confirm_order( $ARGV[1] );
-    if ( defined $res ) {
-        print "Success!  Order submitted for processing.\n";
-    } else {
-        print "Failure: error? = " . DW::Pay::error_text() . "\n";
-    }
-
-} else {
-    print <<'EOF';
-test-pay.pl - payment system debugging tool
-
-Usage:
-
-    test-pay.pl get_paid_status <username>
-        return the status of this user, when they expire, and
-        other useful information.
-
-    test-pay.pl get_payment_details <paymentid>
-        return details on a payment.
-
-    test-pay.pl pp_confirm_order <paymentid>
-        submits an order for processing in our system.
-
-    test-pay.pl pp_get_checkout_url <tgt_uid> <tgt_uname> <frm_uid> <typeid> <duration> <amount>
-        return a PayPal checkout URL.  this function will setup
-        the checkout at PayPal with the given parameters.  note that
-        if you want to send undef, just type 'undef' as a parameter.
-
-    test-pay.pl pp_get_order_details <paymentid>
-        return a PayPal data structure showing the status of an
-        order as per the PayPal systems.
-
-    test-pay.pl pp_get_paymentid_from_token <token>
-        returns the paymentid from a given token, if the token is
-        still valid.  (they're only good for three hours.)
-
-EOF
-
-}
-
diff -r 1a48f68a8811 -r d2b46396b7cc bin/upgrading/s2layers/zesty/layout.s2
--- a/bin/upgrading/s2layers/zesty/layout.s2	Thu May 07 01:47:03 2009 +0000
+++ b/bin/upgrading/s2layers/zesty/layout.s2	Thu May 07 06:49:32 2009 +0000
@@ -142,6 +142,15 @@ layerinfo "redist_uniq" = "zesty/layout"
 #      #                                          #
 ###################################################
 
+propgroup presentation {
+    property use num_items_recent;
+    property use num_items_reading;
+    property use use_journalstyle_entry_page;
+}
+
+set num_items_recent = 10;
+set num_items_reading = 20;
+
 propgroup Text {
     property use text_day_next;
     property use text_day_prev;
@@ -364,13 +373,7 @@ propgroup Miscellaneous {
         example = "http://example.com/favicon.ico";
         }
         set custom_favicon = "";
-
-    property use num_items_recent;
-        set num_items_recent = 10;
-
-    property use num_items_reading;
-        set num_items_reading = 20;
-
+    
     property string default_view_mode {
         des = "Show entries expanded or collapsed by default. Currently this setting affects the reading page only.";
         values = "collapsed|Entries collapsed|expanded|Entries expanded";
--------------------------------------------------------------------------------