[dw-free] remove LJ::server_down_html
[commit: http://hg.dwscoalition.org/dw-free/rev/4852ffcec614]
http://bugs.dwscoalition.org/show_bug.cgi?id=3970
Remove the per-page implementation of messages when the server is down --
handled centrally at a higher level.
Patch by
kareila.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=3970
Remove the per-page implementation of messages when the server is down --
handled centrally at a higher level.
Patch by
Files modified:
- cgi-bin/LJ/User.pm
- cgi-bin/ljlib.pl
- htdocs/admin/invites/codetrace.bml
- htdocs/changeemail.bml
- htdocs/changepassword.bml
- htdocs/community/create.bml
- htdocs/community/manage.bml
- htdocs/community/members.bml
- htdocs/community/moderate.bml
- htdocs/community/pending.bml
- htdocs/community/sentinvites.bml
- htdocs/lostinfo.bml
- htdocs/manage/circle/edit.bml
- htdocs/manage/domain.bml
- htdocs/manage/emailpost.bml
- htdocs/manage/invites.bml
- htdocs/manage/profile/index.bml
- htdocs/manage/pubkey.bml
- htdocs/talkpost.bml
- htdocs/talkpost_do.bml
- htdocs/talkread.bml
- htdocs/tools/recent_emailposts.bml
- htdocs/update.bml
--------------------------------------------------------------------------------
diff -r 499ca7b84a26 -r 4852ffcec614 cgi-bin/LJ/User.pm
--- a/cgi-bin/LJ/User.pm Mon Oct 03 13:44:00 2011 +0800
+++ b/cgi-bin/LJ/User.pm Mon Oct 03 13:47:53 2011 +0800
@@ -8632,13 +8632,6 @@
my $r = DW::Request->get;
my $geta = $opts->{'getargs'};
- if ($LJ::SERVER_DOWN) {
- if ($opts->{'vhost'} eq "customview") {
- return "<!-- LJ down for maintenance -->";
- }
- return LJ::server_down_html();
- }
-
my $u = $opts->{'u'} || LJ::load_user($user);
unless ($u) {
$opts->{'baduser'} = 1;
diff -r 499ca7b84a26 -r 4852ffcec614 cgi-bin/ljlib.pl
--- a/cgi-bin/ljlib.pl Mon Oct 03 13:44:00 2011 +0800
+++ b/cgi-bin/ljlib.pl Mon Oct 03 13:47:53 2011 +0800
@@ -1404,18 +1404,6 @@
}
}
-
-
-# <LJFUNC>
-# name: LJ::server_down_html
-# des: Returns an HTML server down message.
-# returns: A string with a server down message in HTML.
-# </LJFUNC>
-sub server_down_html
-{
- return "<b>$LJ::SERVER_DOWN_SUBJECT</b><br />$LJ::SERVER_DOWN_MESSAGE";
-}
-
# <LJFUNC>
# name: LJ::get_cluster_description
# des: Get descriptive text for a cluster id.
diff -r 499ca7b84a26 -r 4852ffcec614 htdocs/admin/invites/codetrace.bml
--- a/htdocs/admin/invites/codetrace.bml Mon Oct 03 13:44:00 2011 +0800
+++ b/htdocs/admin/invites/codetrace.bml Mon Oct 03 13:47:53 2011 +0800
@@ -6,8 +6,6 @@
use strict;
use vars qw( %POST );
- return LJ::server_down_html if ( $LJ::SERVER_DOWN );
-
my $remote = LJ::get_remote;
my @displayprivs = ( "finduser:codetrace", "finduser:*" );
my $numprivs = @displayprivs;
diff -r 499ca7b84a26 -r 4852ffcec614 htdocs/changeemail.bml
--- a/htdocs/changeemail.bml Mon Oct 03 13:44:00 2011 +0800
+++ b/htdocs/changeemail.bml Mon Oct 03 13:47:53 2011 +0800
@@ -21,11 +21,6 @@
my $body;
- if ($LJ::SERVER_DOWN) {
- $body = LJ::server_down_html();
- return $body;
- }
-
my $remote = LJ::get_remote()
or return "<?needlogin?>";
diff -r 499ca7b84a26 -r 4852ffcec614 htdocs/changepassword.bml
--- a/htdocs/changepassword.bml Mon Oct 03 13:44:00 2011 +0800
+++ b/htdocs/changepassword.bml Mon Oct 03 13:47:53 2011 +0800
@@ -21,11 +21,6 @@
my $body;
- if ($LJ::SERVER_DOWN) {
- $body = LJ::server_down_html();
- return $body;
- }
-
if ($LJ::USE_SSL && ! $LJ::IS_SSL && $FORM{'ssl'} ne "no") {
my $getextra = $GET{auth} ? "?auth=$GET{auth}" : "";
return BML::redirect("$LJ::SSLROOT/changepassword$getextra");
diff -r 499ca7b84a26 -r 4852ffcec614 htdocs/community/create.bml
--- a/htdocs/community/create.bml Mon Oct 03 13:44:00 2011 +0800
+++ b/htdocs/community/create.bml Mon Oct 03 13:47:53 2011 +0800
@@ -22,7 +22,6 @@
LJ::set_active_crumb('createcommunity');
- return LJ::server_down_html() if $LJ::SERVER_DOWN;
return "<?badinput?>" unless LJ::text_in(\%POST);
my $mode = $POST{mode} || 'getinfo';
diff -r 499ca7b84a26 -r 4852ffcec614 htdocs/community/manage.bml
--- a/htdocs/community/manage.bml Mon Oct 03 13:44:00 2011 +0800
+++ b/htdocs/community/manage.bml Mon Oct 03 13:47:53 2011 +0800
@@ -20,8 +20,6 @@
use strict;
use vars qw/ %GET %POST /;
- return LJ::server_down_html() if $LJ::SERVER_DOWN;
-
LJ::set_active_crumb('managecommunities');
my $dbr = LJ::get_db_reader();
diff -r 499ca7b84a26 -r 4852ffcec614 htdocs/community/members.bml
--- a/htdocs/community/members.bml Mon Oct 03 13:44:00 2011 +0800
+++ b/htdocs/community/members.bml Mon Oct 03 13:47:53 2011 +0800
@@ -22,8 +22,6 @@
LJ::set_active_crumb('commmembers');
- return LJ::server_down_html() if $LJ::SERVER_DOWN;
-
my $ret;
# get remote
diff -r 499ca7b84a26 -r 4852ffcec614 htdocs/community/moderate.bml
--- a/htdocs/community/moderate.bml Mon Oct 03 13:44:00 2011 +0800
+++ b/htdocs/community/moderate.bml Mon Oct 03 13:47:53 2011 +0800
@@ -22,7 +22,6 @@
use LJ::Poll;
use vars qw(%GET %POST);
LJ::set_active_crumb('moderate');
- return LJ::server_down_html() if ($LJ::SERVER_DOWN);
my $ret;
my $remote = LJ::get_remote();
diff -r 499ca7b84a26 -r 4852ffcec614 htdocs/community/pending.bml
--- a/htdocs/community/pending.bml Mon Oct 03 13:44:00 2011 +0800
+++ b/htdocs/community/pending.bml Mon Oct 03 13:47:53 2011 +0800
@@ -22,8 +22,6 @@
LJ::set_active_crumb('commpending');
- return LJ::server_down_html() if $LJ::SERVER_DOWN;
-
# get remote
my $remote = LJ::get_remote();
return "<?needlogin?>" unless $remote;
diff -r 499ca7b84a26 -r 4852ffcec614 htdocs/community/sentinvites.bml
--- a/htdocs/community/sentinvites.bml Mon Oct 03 13:44:00 2011 +0800
+++ b/htdocs/community/sentinvites.bml Mon Oct 03 13:47:53 2011 +0800
@@ -22,8 +22,6 @@
LJ::set_active_crumb('commsentinvites');
- return LJ::server_down_html() if $LJ::SERVER_DOWN;
-
# always have links at top
my $ret;
diff -r 499ca7b84a26 -r 4852ffcec614 htdocs/lostinfo.bml
--- a/htdocs/lostinfo.bml Mon Oct 03 13:44:00 2011 +0800
+++ b/htdocs/lostinfo.bml Mon Oct 03 13:47:53 2011 +0800
@@ -24,8 +24,6 @@
LJ::set_active_crumb('lostinfo');
- return LJ::server_down_html() if $LJ::SERVER_DOWN;
-
my %captcha_fields;
@captcha_fields{DW::Captcha->form_fields} = @POST{DW::Captcha->form_fields};
my $captcha = DW::Captcha->new( 'lostinfo', %captcha_fields );
diff -r 499ca7b84a26 -r 4852ffcec614 htdocs/manage/circle/edit.bml
--- a/htdocs/manage/circle/edit.bml Mon Oct 03 13:44:00 2011 +0800
+++ b/htdocs/manage/circle/edit.bml Mon Oct 03 13:47:53 2011 +0800
@@ -22,9 +22,6 @@
LJ::set_active_crumb('managefriends');
- return LJ::server_down_html()
- if $LJ::SERVER_DOWN;
-
return "<?badinput?>"
unless LJ::text_in(\%POST);
diff -r 499ca7b84a26 -r 4852ffcec614 htdocs/manage/domain.bml
--- a/htdocs/manage/domain.bml Mon Oct 03 13:44:00 2011 +0800
+++ b/htdocs/manage/domain.bml Mon Oct 03 13:47:53 2011 +0800
@@ -25,8 +25,6 @@
use strict;
use vars qw(%GET %POST);
- return LJ::server_down_html() if $LJ::SERVER_DOWN;
-
LJ::set_active_crumb('domain');
my $remote = LJ::get_remote();
diff -r 499ca7b84a26 -r 4852ffcec614 htdocs/manage/emailpost.bml
--- a/htdocs/manage/emailpost.bml Mon Oct 03 13:44:00 2011 +0800
+++ b/htdocs/manage/emailpost.bml Mon Oct 03 13:47:53 2011 +0800
@@ -47,7 +47,6 @@
LJ::set_active_crumb('mobilepost');
return $ML{'.error.sitenotconfigured'} unless $LJ::EMAIL_POST_DOMAIN;
- return LJ::server_down_html() if $LJ::SERVER_DOWN;
my $u = LJ::get_remote();
return "<?needlogin?>" unless $u;
diff -r 499ca7b84a26 -r 4852ffcec614 htdocs/manage/invites.bml
--- a/htdocs/manage/invites.bml Mon Oct 03 13:44:00 2011 +0800
+++ b/htdocs/manage/invites.bml Mon Oct 03 13:47:53 2011 +0800
@@ -22,9 +22,6 @@
LJ::set_active_crumb('comminvites');
- return LJ::server_down_html()
- if $LJ::SERVER_DOWN;
-
my $remote = LJ::get_remote();
return "<?needlogin?>"
unless $remote;
diff -r 499ca7b84a26 -r 4852ffcec614 htdocs/manage/profile/index.bml
--- a/htdocs/manage/profile/index.bml Mon Oct 03 13:44:00 2011 +0800
+++ b/htdocs/manage/profile/index.bml Mon Oct 03 13:47:53 2011 +0800
@@ -24,8 +24,6 @@
LJ::set_active_crumb('editprofile');
LJ::need_res( { priority => $LJ::OLD_RES_PRIORITY }, 'stc/lj_settings.css' );
- return LJ::server_down_html() if $LJ::SERVER_DOWN;
-
my $remote = LJ::get_remote()
or return "<?needlogin?>";
diff -r 499ca7b84a26 -r 4852ffcec614 htdocs/manage/pubkey.bml
--- a/htdocs/manage/pubkey.bml Mon Oct 03 13:44:00 2011 +0800
+++ b/htdocs/manage/pubkey.bml Mon Oct 03 13:47:53 2011 +0800
@@ -23,7 +23,6 @@
LJ::set_active_crumb('setpgpkey');
return $ML{'.error.notconfigured'} unless $LJ::USE_PGP;
- return LJ::server_down_html() if $LJ::SERVER_DOWN;
my $u = LJ::get_remote();
return "<?needlogin?>"
diff -r 499ca7b84a26 -r 4852ffcec614 htdocs/talkpost.bml
--- a/htdocs/talkpost.bml Mon Oct 03 13:44:00 2011 +0800
+++ b/htdocs/talkpost.bml Mon Oct 03 13:47:53 2011 +0800
@@ -21,8 +21,6 @@
$head = ""; # not local, used to build <link> tags
- return LJ::server_down_html() if $LJ::SERVER_DOWN;
-
LJ::need_res(qw (stc/display_none.css stc/talkpage.css) );
my $remote = LJ::get_remote();
diff -r 499ca7b84a26 -r 4852ffcec614 htdocs/talkpost_do.bml
--- a/htdocs/talkpost_do.bml Mon Oct 03 13:44:00 2011 +0800
+++ b/htdocs/talkpost_do.bml Mon Oct 03 13:47:53 2011 +0800
@@ -43,8 +43,6 @@
return if ($POST{'body'} =~ /$re/);
}
- return LJ::server_down_html() if $LJ::SERVER_DOWN;
-
my $editid = $POST{editid};
# OpenID support
diff -r 499ca7b84a26 -r 4852ffcec614 htdocs/talkread.bml
--- a/htdocs/talkread.bml Mon Oct 03 13:44:00 2011 +0800
+++ b/htdocs/talkread.bml Mon Oct 03 13:47:53 2011 +0800
@@ -27,8 +27,6 @@
my $title = $_[1] ? \$_[1]->{'title'} : \$r_title;
my $bodyopts = $_[1] ? \$_[1]->{'bodyopts'} : \$r_bodyopts;
- return LJ::server_down_html() if $LJ::SERVER_DOWN;
-
my $pics = LJ::Talk::get_subjecticons();
## workaround mail client bug when don't understand quoted-printable.
diff -r 499ca7b84a26 -r 4852ffcec614 htdocs/tools/recent_emailposts.bml
--- a/htdocs/tools/recent_emailposts.bml Mon Oct 03 13:44:00 2011 +0800
+++ b/htdocs/tools/recent_emailposts.bml Mon Oct 03 13:47:53 2011 +0800
@@ -22,7 +22,6 @@
return "Sorry, this site is not configured to use the emailgateway."
unless $LJ::EMAIL_POST_DOMAIN;
- return LJ::server_down_html() if $LJ::SERVER_DOWN;
my $remote = LJ::get_remote();
return "<?needlogin?>" unless $remote;
diff -r 499ca7b84a26 -r 4852ffcec614 htdocs/update.bml
--- a/htdocs/update.bml Mon Oct 03 13:44:00 2011 +0800
+++ b/htdocs/update.bml Mon Oct 03 13:47:53 2011 +0800
@@ -30,12 +30,6 @@
$$title = $ML{'.title2'};
- # server down?
- if ($LJ::SERVER_DOWN) {
- $$body = LJ::server_down_html();
- return;
- }
-
LJ::set_active_crumb("postentry");
# invalid text input?
--------------------------------------------------------------------------------
