X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FUID.pm;h=431efb16d154bf3de8c252c1dc3339d3286a2761;hb=ca28df64e6ca903804a9de96f686c5b3daa1c1ee;hp=a94e90f8619f4a8677ed8cf4ba0d3289bfd43fa2;hpb=53aceae6c3023e7971ef80d55e62c47bf09a2092;p=freeside.git diff --git a/FS/FS/UID.pm b/FS/FS/UID.pm index a94e90f86..431efb16d 100644 --- a/FS/FS/UID.pm +++ b/FS/FS/UID.pm @@ -3,7 +3,7 @@ package FS::UID; use strict; use vars qw( @ISA @EXPORT_OK $DEBUG $me $cgi $dbh $freeside_uid $user - $conf_dir $secrets $datasrc $db_user $db_pass %callback @callback + $conf_dir $cache_dir $secrets $datasrc $db_user $db_pass %callback @callback $driver_name $AutoCommit $callback_hack $use_confcompat ); use subs qw( @@ -25,7 +25,8 @@ $me = '[FS::UID]'; $freeside_uid = scalar(getpwnam('freeside')); -$conf_dir = "%%%FREESIDE_CONF%%%"; +$conf_dir = "%%%FREESIDE_CONF%%%"; +$cache_dir = "%%%FREESIDE_CACHE%%%"; $AutoCommit = 1; #ours, not DBI $use_confcompat = 1; @@ -114,13 +115,10 @@ sub forksuidsetup { warn "$me forksuidsetup deciding upon config system to use\n" if $DEBUG; - my $sth = ''; - if ( dbdef->table('conf') - and $sth = $dbh->prepare("SELECT COUNT(*) FROM conf") - and $sth->execute - ) - { + if ( ! $FS::Schema::setup_hack && dbdef->table('conf') ) { + my $sth = $dbh->prepare("SELECT COUNT(*) FROM conf") or die $dbh->errstr; + $sth->execute or die $sth->errstr; my $confcount = $sth->fetchrow_arrayref->[0]; if ($confcount) {