]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 165366: When editparams is used to shutdown Bugzilla, provide a link back to...
authorjustdave%syndicomm.com <>
Tue, 2 Sep 2003 08:47:15 +0000 (08:47 +0000)
committerjustdave%syndicomm.com <>
Tue, 2 Sep 2003 08:47:15 +0000 (08:47 +0000)
Patch by Vlad Dascalu <jocuri@softhome.net>
r= kiko, a= justdave

doeditparams.cgi

index 4abf1ccbf3a075d30c93514ec85981bc51cf31c9..04d0ac98bd339d95fdf1e0f830e1942b452631e9 100755 (executable)
@@ -48,6 +48,8 @@ if (!UserInGroup("tweakparams")) {
 
 PutHeader("Saving new parameters");
 
+my $howto = "";
+
 foreach my $i (GetParamList()) {
     my $name = $i->{'name'};
     my $value = $::FORM{$name};
@@ -97,6 +99,12 @@ foreach my $i (GetParamList()) {
         }
         print "Changed " . html_quote($name) . ".<br>\n";
         SetParam($name, $value);
+        if (($name eq "shutdownhtml") && ($value ne "")) {
+            # The system is down, inform the user how to restore it
+            $howto = "<p>Bugzilla has now been shut down, to re-enable ".
+                    "the system, please return to ".
+                    "<a href=\"editparams.cgi\">editparams.cgi</a>.</p>";
+        }
     }
 }
 
@@ -105,7 +113,8 @@ WriteParams();
 
 unlink "data/versioncache";
 
-print "OK, done.<p>\n";
+print "<p>OK, done.</p>\n";
+print $howto;
 print "<a href=\"editparams.cgi\">Edit the params some more.</a><p>\n";
 print "<a href=\"query.cgi\">Go back to the query page.</a>\n";