From eb173d8fedab5032f0a660cfef6d8b76d826956e Mon Sep 17 00:00:00 2001 From: "gerv%gerv.net" <> Date: Thu, 14 Dec 2000 20:19:35 +0000 Subject: Fixed dupes table detection code; added check for graphs directory. --- checksetup.pl | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'checksetup.pl') 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 -$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. -- cgit v1.2.3-24-g4f1b