summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgerv%gerv.net <>2000-12-14 21:19:35 +0100
committergerv%gerv.net <>2000-12-14 21:19:35 +0100
commiteb173d8fedab5032f0a660cfef6d8b76d826956e (patch)
tree4baf94d30a40ae0f5aeb9f358b22c90228862b60
parentfb8f115ebb37dcf6190a14cbaae50c365b6b2447 (diff)
downloadbugzilla-eb173d8fedab5032f0a660cfef6d8b76d826956e.tar.gz
bugzilla-eb173d8fedab5032f0a660cfef6d8b76d826956e.tar.xz
Fixed dupes table detection code; added check for graphs directory.
-rwxr-xr-xchecksetup.pl21
1 files changed, 14 insertions, 7 deletions
diff --git a/checksetup.pl b/checksetup.pl
index 4ec56e7f1..2860a062d 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -1753,14 +1753,9 @@ if ( CountIndexes('keywords') != 3 ) {
# initially. It's executed if the table is empty; if it's empty because there
# are no dupes (as opposed to having just created the table) it won't have
# any effect anyway, so it doesn't matter.
-
-# This should give us the number of populated rows but seems to return "5"
-# all the time <shrug>
-$dbh->prepare("SELECT * FROM duplicates");
+$sth = $dbh->prepare("SELECT count(*) from duplicates");
$sth->execute();
-
-if ($sth->fetchrow_array() == 5)
-{
+if (!($sth->fetchrow_arrayref()->[0])) {
# populate table
print("Populating duplicates table...\n");
@@ -1788,6 +1783,18 @@ if ($sth->fetchrow_array() == 5)
$::regenerateshadow = 1;
}
+# 2000-12-14 New graphing system requires a directory to put the graphs in
+# How do we make the new directory owned by the webserver's group? Until
+# we find out, make it 0777.
+unless (-d 'graphs') {
+ print "Creating graphs directory ...\n";
+ mkdir 'graphs', 0777; # was 0770 in the code (above) I pinched this from
+ if ($::webservergroup eq "") {
+ chmod 0777, 'graphs';
+ }
+}
+
+
#
# If you had to change the --TABLE-- definition in any way, then add your
# differential change code *** A B O V E *** this comment.