kareila: (Default)
kareila ([personal profile] kareila) wrote in [site community profile] changelog2011-01-01 06:05 am

[dw-free] New implementation to overriding other users style choices.

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

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

Housekeeping - define new user methods in correct section. Don't check
keep_args twice in create_url.

Patch by [personal profile] kareila.

Files modified:
  • cgi-bin/LJ/User.pm
  • cgi-bin/weblib.pl
--------------------------------------------------------------------------------
diff -r e8e390fd9d08 -r 5ce9fca619c5 cgi-bin/LJ/User.pm
--- a/cgi-bin/LJ/User.pm	Fri Dec 31 14:51:57 2010 +0800
+++ b/cgi-bin/LJ/User.pm	Sat Jan 01 00:05:39 2011 -0600
@@ -5526,14 +5526,6 @@ sub revoke_priv_all {
     return 1;
 }
 
-sub opt_viewentrystyle {
-    return ( $_[0]->prop( 'opt_viewentrystyle' ) || "O" );
-}
-
-sub opt_viewjournalstyle {
-    return ( $_[0]->prop( 'opt_viewjournalstyle' ) || "O" );
-}
-
 ########################################################################
 ###  24. Styles and S2-Related Functions
 
@@ -5647,6 +5639,14 @@ sub opt_embedplaceholders {
         my $imagelinks = $u->prop('opt_imagelinks');
         return $imagelinks;
     }
+}
+
+sub opt_viewentrystyle {
+    return ( $_[0]->prop( 'opt_viewentrystyle' ) || "O" );
+}
+
+sub opt_viewjournalstyle {
+    return ( $_[0]->prop( 'opt_viewjournalstyle' ) || "O" );
 }
 
 sub set_default_style {
diff -r e8e390fd9d08 -r 5ce9fca619c5 cgi-bin/weblib.pl
--- a/cgi-bin/weblib.pl	Fri Dec 31 14:51:57 2010 +0800
+++ b/cgi-bin/weblib.pl	Sat Jan 01 00:05:39 2011 -0600
@@ -1229,9 +1229,6 @@ sub create_url {
     }
 
     $opts{keep_args} = [ keys %$orig_args ] if defined $opts{keep_args} and $opts{keep_args} == 1;
-    $opts{keep_args} = [] if ref $opts{keep_args} ne 'ARRAY';
-
-    $opts{keep_args} = [ keys %$orig_args ] if $opts{keep_args} == 1;
     $opts{keep_args} = [] if ref $opts{keep_args} ne 'ARRAY';
 
     # Move over arguments that we need to keep
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org