holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

[livejournal] r23528: LJSUP-14516: Update.bml final release

Committer: akanashin
LJSUP-14516: Update.bml final release
U   trunk/cgi-bin/LJ/Widget/EntryForm.pm
U   trunk/cgi-bin/ljhooks.pl
Modified: trunk/cgi-bin/LJ/Widget/EntryForm.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/EntryForm.pm	2013-01-10 13:41:35 UTC (rev 23527)
+++ trunk/cgi-bin/LJ/Widget/EntryForm.pm	2013-01-11 08:49:06 UTC (rev 23528)
@@ -447,7 +447,7 @@
     $out .= "<script>try { \$('journal_timezone').value = - (new Date).getTimezoneOffset()/0.6; } catch(e) {} </script>";
     $out .= "<div id='metainfo-wrap'>";
 
-    if ( LJ::is_enabled('post_controller') ) {
+    if ( LJ::is_enabled('post_controller') && !($remote && $remote->prop('updatebml_only_old'))) {
         $out .= "<p class=\"b-updatepage-switchver\">";
         $out .= "<button type=\"submit\" name=\"ljpost:on\" value=\"1\" class=\"b-updatepage-switchver-button\">";
         $out .= "<span class=\"b-updatepage-switchver-inner\">". LJ::Lang::ml('talk.post.beta.turn.on') ."</span>";

Modified: trunk/cgi-bin/ljhooks.pl
===================================================================
--- trunk/cgi-bin/ljhooks.pl	2013-01-10 13:41:35 UTC (rev 23527)
+++ trunk/cgi-bin/ljhooks.pl	2013-01-11 08:49:06 UTC (rev 23528)
@@ -355,6 +355,16 @@
     }
 });
 
+register_setter("updatebml_only_old", sub {
+    my ($u, $key, $value, $err) = @_;
+    unless ($value =~ /^(0|1)$/) {
+        $$err = "Illegal value. Must be '0' or '1'";
+        return 0;
+    }
+    $u->set_prop("updatebml_only_old", $value);
+    return 1;
+});
+
 register_setter('custom_usericon', sub {
     my ($u, $key, $value, $err) = @_;
 

Tags: akanashin, holyandrew, livejournal, pl, pm
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments