]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Provide a simple param to let the maintainer shut down Bugzilla for a while.
authorterry%mozilla.org <>
Thu, 13 Jan 2000 02:55:16 +0000 (02:55 +0000)
committerterry%mozilla.org <>
Thu, 13 Jan 2000 02:55:16 +0000 (02:55 +0000)
CGI.pl
defparams.pl
doeditparams.cgi
editparams.cgi

diff --git a/CGI.pl b/CGI.pl
index 0ab0cd10cb79c41825ab3b9e5f18068a911e54e1..91edd28f15ceccfd027335cb70a605c92c4c158f 100644 (file)
--- a/CGI.pl
+++ b/CGI.pl
@@ -494,7 +494,7 @@ sub confirm_login {
 
     if ($loginok != 1) {
         print "Content-type: text/html\n\n";
-        PutHeader("Login");
+        PutHeader("Login", undef, undef, undef, 1);
         print "I need a legitimate e-mail address and password to continue.\n";
         if (!defined $nexturl || $nexturl eq "") {
            # Sets nexturl to be argv0, stripping everything up to and
@@ -548,7 +548,7 @@ name=PleaseMailAPassword>
 
 
 sub PutHeader {
-    my ($title, $h1, $h2, $extra) = (@_);
+    my ($title, $h1, $h2, $extra, $ignoreshutdown) = (@_);
 
     if (!defined $h1) {
        $h1 = $title;
@@ -583,6 +583,13 @@ sub PutHeader {
     print Param("blurbhtml");
 
     print "</TD></TR></TABLE>\n";
+
+    if (Param("shutdownhtml")) {
+        if (!$ignoreshutdown) {
+            print Param("shutdownhtml");
+            exit;
+        }
+    }
 }
 
 
index 41841eb19cc0ee685edcdefbca4722f16ab9a2ef..e258d281e93edf836c6d5283a664023de7de1527 100644 (file)
@@ -176,6 +176,12 @@ information about what Bugzilla is and what it can do, see
 
 
     
+DefParam("shutdownhtml",
+         "If this field is non-empty, then Bugzilla will be completely disabled and this text will be displayed instead of all the Bugzilla pages.",
+         "l",
+         "");
+
+
 DefParam("warnbannerhtml",
          "HTML to prepend to warning messages.",
          "l",
index 5f4eb9e1a2e33fbf770607948fc4a50daf7a52f9..6743c03781a189cbd0bb5eecd18367c61cb629a6 100755 (executable)
@@ -43,7 +43,7 @@ if (!UserInGroup("tweakparams")) {
 }
 
 
-PutHeader("Saving new parameters");
+PutHeader("Saving new parameters", undef, undef, undef, 1);
 
 foreach my $i (@::param_list) {
 #    print "Processing $i...<BR>\n";
index e2273fc2eaed73d7605025e3715e26f9fa2e687f..b215d6192e046e585828f0e6e80c358c1098e529 100755 (executable)
@@ -42,7 +42,8 @@ if (!UserInGroup("tweakparams")) {
 }
 
 
-PutHeader("Edit parameters");
+
+PutHeader("Edit parameters", undef, undef, undef, 1);
 
 print "This lets you edit the basic operating parameters of bugzilla.\n";
 print "Be careful!\n";