summaryrefslogtreecommitdiffstats
path: root/globals.pl
diff options
context:
space:
mode:
authorjake%acutex.net <>2001-08-14 04:11:31 +0200
committerjake%acutex.net <>2001-08-14 04:11:31 +0200
commit669eed6c9dcf6300c3e3f5db1970f2a26c5317e6 (patch)
tree5b644d59f328f95993909050b666f2a3cafecfb9 /globals.pl
parent45e6db585277cc4bbd44a3242c082b3354bb27a3 (diff)
downloadbugzilla-669eed6c9dcf6300c3e3f5db1970f2a26c5317e6.tar.gz
bugzilla-669eed6c9dcf6300c3e3f5db1970f2a26c5317e6.tar.xz
Fix for bug 95082 - Param('shutdownhtml') doesn't completely shut down bugzilla.
r= justdave@syndicomm.com
Diffstat (limited to 'globals.pl')
-rw-r--r--globals.pl17
1 files changed, 17 insertions, 0 deletions
diff --git a/globals.pl b/globals.pl
index a3412d634..f41397451 100644
--- a/globals.pl
+++ b/globals.pl
@@ -200,6 +200,15 @@ sub SendSQL {
if ($str =~ /^LOCK TABLES/i && $str !~ /shadowlog/ && $::dbwritesallowed) {
$str =~ s/^LOCK TABLES/LOCK TABLES shadowlog WRITE, /i;
}
+ # If we are shutdown, we don't want to run queries except in special cases
+ if (Param('shutdownhtml')) {
+ if ($0 =~ m:[\\/](do)?editparams.cgi$:) {
+ $::ignorequery = 0;
+ } else {
+ $::ignorequery = 1;
+ return;
+ }
+ }
SqlLog($str);
$::currentquery = $::db->prepare($str);
$::currentquery->execute
@@ -221,6 +230,10 @@ sub SendSQL {
}
sub MoreSQLData {
+ # $::ignorequery is set in SendSQL
+ if ($::ignorequery) {
+ return 0;
+ }
if (defined @::fetchahead) {
return 1;
}
@@ -231,6 +244,10 @@ sub MoreSQLData {
}
sub FetchSQLData {
+ # $::ignorequery is set in SendSQL
+ if ($::ignorequery) {
+ return;
+ }
if (defined @::fetchahead) {
my @result = @::fetchahead;
undef @::fetchahead;