fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-08-26 01:18 am

[dw-free] Preserve journal style/app style preference

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

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

Display style-specific option to "Show entry pages in my journal style
rather than the site skin" as obsolete.

Patch by [personal profile] kareila.

Files modified:
  • bin/upgrading/s2layers/core1.s2
  • bin/upgrading/s2layers/core2.s2
  • cgi-bin/LJ/S2Theme.pm
  • cgi-bin/LJ/Widget/S2PropGroup.pm
--------------------------------------------------------------------------------
diff -r a0fe346a4f78 -r f969a2fa13a6 bin/upgrading/s2layers/core1.s2
--- a/bin/upgrading/s2layers/core1.s2	Thu Aug 25 23:48:21 2011 +0800
+++ b/bin/upgrading/s2layers/core1.s2	Fri Aug 26 09:17:50 2011 +0800
@@ -1682,6 +1682,8 @@
 
 property bool view_entry_disabled {
     des = "Disable customized comment pages for your journal";
+    note = "OBSOLETE: This option has been moved to Account Settings";
+    obsolete = 1;
 }
 set view_entry_disabled = false;
 
diff -r a0fe346a4f78 -r f969a2fa13a6 bin/upgrading/s2layers/core2.s2
--- a/bin/upgrading/s2layers/core2.s2	Thu Aug 25 23:48:21 2011 +0800
+++ b/bin/upgrading/s2layers/core2.s2	Fri Aug 26 09:17:50 2011 +0800
@@ -1204,7 +1204,11 @@
 set show_userpics_comments = true;
 
 # was !view_entry_disabled
-property bool use_journalstyle_entry_page  { des = "Show entry pages in my journal style rather than the site skin"; }
+property bool use_journalstyle_entry_page {
+    des = "Show entry pages in my journal style rather than the site skin";
+    note = "OBSOLETE: This option has been moved to Account Settings";
+    obsolete = 1;
+}
 set use_journalstyle_entry_page = true;
 
 property bool use_journalstyle_icons_page  { des = "Show icons page in my journal style rather than the site skin"; }
diff -r a0fe346a4f78 -r f969a2fa13a6 cgi-bin/LJ/S2Theme.pm
--- a/cgi-bin/LJ/S2Theme.pm	Thu Aug 25 23:48:21 2011 +0800
+++ b/cgi-bin/LJ/S2Theme.pm	Fri Aug 26 09:17:50 2011 +0800
@@ -860,7 +860,6 @@
         control_strip_fgcolor
         control_strip_bordercolor
         control_strip_linkcolor
-        use_journalstyle_entry_page
     )
 }
 
@@ -872,6 +871,7 @@
         page_recent_items
         page_friends_items
         view_entry_disabled
+        use_journalstyle_entry_page
         use_shared_pic
         linklist_support
     )
diff -r a0fe346a4f78 -r f969a2fa13a6 cgi-bin/LJ/Widget/S2PropGroup.pm
--- a/cgi-bin/LJ/Widget/S2PropGroup.pm	Thu Aug 25 23:48:21 2011 +0800
+++ b/cgi-bin/LJ/Widget/S2PropGroup.pm	Fri Aug 26 09:17:50 2011 +0800
@@ -321,8 +321,6 @@
     return 1 if $prop_name eq "control_strip_fgcolor";
     return 1 if $prop_name eq "control_strip_bordercolor";
     return 1 if $prop_name eq "control_strip_linkcolor";
-    return 1 if $prop_name eq "use_journalstyle_entry_page";
-    return 1 if $prop_name eq "view_entry_disabled";
 
     my $hook_rv = LJ::Hooks::run_hook("skip_prop_override", $prop_name, user => $opts{user}, theme => $theme, style => $opts{style});
     return $hook_rv if $hook_rv;
@@ -456,21 +454,23 @@
         $ret .= "</td>" unless $is_group;
     } elsif ($type eq "bool") {
         $ret .= "<td class='prop-check'>" unless $is_group;
-        $ret .= $class->html_check(
-            name => $name,
-            disabled => ! $can_use,
-            selected => $override,
-            label => $prop->{label},
-            id => $name,
-        );
+        unless ( $prop->{obsolete} ) {  # can't be changed, so don't print
+            $ret .= $class->html_check(
+                name => $name,
+                disabled => ! $can_use,
+                selected => $override,
+                label => $prop->{label},
+                id => $name,
+            );
 
-        # force the checkbox to be submitted, if the user unchecked it
-        # so that it can be processed (disabled) when handling the post
-        $ret .= $class->html_hidden(
-            "${name}",
-            "0",
-            { disabled => ! $can_use }
-        );
+            # force the checkbox to be submitted, if the user unchecked it
+            # so that it can be processed (disabled) when handling the post
+            $ret .= $class->html_hidden(
+                "${name}",
+                "0",
+                { disabled => ! $can_use }
+            );
+        }
 
         $ret .= "</td>" unless $is_group;
     } elsif ($type eq "string") {
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
No Subject Icon Selected
More info about formatting

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