madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r22301: LJSUP-12318: Writer's block flag

Committer: sbelyaev
LJSUP-12318: Writer's block flag
U   trunk/bin/upgrading/en.dat
U   trunk/htdocs/admin/qotd/add.bml
U   trunk/htdocs/admin/qotd/manage.bml
U   trunk/htdocs/admin/qotd/responses.bml
U   trunk/htdocs/misc/latestqotd.bml
U   trunk/htdocs/misc/qotdarchive.bml
U   trunk/htdocs/update.bml
Modified: trunk/bin/upgrading/en.dat
===================================================================
--- trunk/bin/upgrading/en.dat	2012-06-21 12:17:23 UTC (rev 22300)
+++ trunk/bin/upgrading/en.dat	2012-06-21 14:40:23 UTC (rev 22301)
@@ -9294,6 +9294,8 @@
 widget.vgifts.viewall|staleness=1
 widget.vgifts.viewall=more
 
+qotd.disabled=Writer's block is disabled
+
 xmlrpc.client_error=Client error: 
 
 xmlrpc.des.and=[[first]] and [[second]]

Modified: trunk/htdocs/admin/qotd/add.bml
===================================================================
--- trunk/htdocs/admin/qotd/add.bml	2012-06-21 12:17:23 UTC (rev 22300)
+++ trunk/htdocs/admin/qotd/add.bml	2012-06-21 14:40:23 UTC (rev 22301)
@@ -8,6 +8,9 @@
 
     my $remote = LJ::get_remote();
 
+    return LJ::error_list( BML::ml('qotd.disabled', { sitename => $LJ::SITENAMESHORT } ))
+        if !LJ::is_enabled('qotd');
+
     return "<?needlogin?>"
         unless $remote;
 

Modified: trunk/htdocs/admin/qotd/manage.bml
===================================================================
--- trunk/htdocs/admin/qotd/manage.bml	2012-06-21 12:17:23 UTC (rev 22300)
+++ trunk/htdocs/admin/qotd/manage.bml	2012-06-21 14:40:23 UTC (rev 22301)
@@ -8,6 +8,9 @@
 
     my $remote = LJ::get_remote();
 
+    return LJ::error_list( BML::ml('qotd.disabled', { sitename => $LJ::SITENAMESHORT } )) 
+        if !LJ::is_enabled('qotd');
+
     return "<?needlogin?>"
         unless $remote;
 

Modified: trunk/htdocs/admin/qotd/responses.bml
===================================================================
--- trunk/htdocs/admin/qotd/responses.bml	2012-06-21 12:17:23 UTC (rev 22300)
+++ trunk/htdocs/admin/qotd/responses.bml	2012-06-21 14:40:23 UTC (rev 22301)
@@ -10,6 +10,9 @@
 
     $title = "Writer's Block Report";
 
+    return LJ::error_list( BML::ml('qotd.disabled', { sitename => $LJ::SITENAMESHORT } ))
+        if !LJ::is_enabled('qotd');
+
     return "<?needlogin?>"
         unless $remote;
 

Modified: trunk/htdocs/misc/latestqotd.bml
===================================================================
--- trunk/htdocs/misc/latestqotd.bml	2012-06-21 12:17:23 UTC (rev 22300)
+++ trunk/htdocs/misc/latestqotd.bml	2012-06-21 14:40:23 UTC (rev 22301)
@@ -5,6 +5,9 @@
     use strict;
     use vars qw(%GET %POST $title $headextra @errors @warnings);
 
+    return LJ::error_list( BML::ml('qotd.disabled', { sitename => $LJ::SITENAMESHORT } ))
+        if !LJ::is_enabled('qotd');
+
     my $remote = LJ::get_remote(); # used to check entry security
 
     $title = "Writer's Block";

Modified: trunk/htdocs/misc/qotdarchive.bml
===================================================================
--- trunk/htdocs/misc/qotdarchive.bml	2012-06-21 12:17:23 UTC (rev 22300)
+++ trunk/htdocs/misc/qotdarchive.bml	2012-06-21 14:40:23 UTC (rev 22301)
@@ -7,6 +7,9 @@
 
     $title = $ML{'.title'};
 
+    return LJ::error_list( BML::ml('qotd.disabled', { sitename => $LJ::SITENAMESHORT } ))
+        if !LJ::is_enabled('qotd');
+
     my $page = defined $GET{page} ? $GET{page} : 1;
 
     return LJ::Widget::QotDArchive->render( page => $page );

Modified: trunk/htdocs/update.bml
===================================================================
--- trunk/htdocs/update.bml	2012-06-21 12:17:23 UTC (rev 22300)
+++ trunk/htdocs/update.bml	2012-06-21 14:40:23 UTC (rev 22301)
@@ -16,6 +16,13 @@
     my $update_type = $POST{'type'} || $GET{'type'};
     $$title = ($update_type eq 'sticky') ?  $ML{'.title2_sticky'} : $ML{'.title2'};
 
+    if ($GET{qotd} && !LJ::is_enabled('qotd')) {
+        $$body = LJ::error_list( BML::ml('qotd.disabled',
+                                { sitename => $LJ::SITENAMESHORT } ));
+        return;
+    }
+
+
     # server down?
     if ($LJ::SERVER_DOWN) {
         $$body = LJ::server_down_html();

Tags: bml, dat, livejournal, madeon, sbelyaev
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