converting to use new subsystems.
This commit is contained in:
parent
fa44bd2a31
commit
fc897bb796
2 changed files with 9 additions and 24 deletions
|
|
@ -58,6 +58,7 @@ use Tie::IxHash ();
|
||||||
use WebGUI ();
|
use WebGUI ();
|
||||||
use WebGUI::Attachment ();
|
use WebGUI::Attachment ();
|
||||||
use WebGUI::Authentication ();
|
use WebGUI::Authentication ();
|
||||||
|
use WebGUI::Cache;
|
||||||
use WebGUI::DateTime ();
|
use WebGUI::DateTime ();
|
||||||
#use WebGUI::Discussion (); # compile problems when this is included
|
#use WebGUI::Discussion (); # compile problems when this is included
|
||||||
use WebGUI::ErrorHandler ();
|
use WebGUI::ErrorHandler ();
|
||||||
|
|
|
||||||
|
|
@ -224,31 +224,15 @@ if ($error ne "") {
|
||||||
print "\nFound config file ........................ ".$file."\n";
|
print "\nFound config file ........................ ".$file."\n";
|
||||||
print "Verifying file ........................... ";
|
print "Verifying file ........................... ";
|
||||||
my ($config);
|
my ($config);
|
||||||
$config = new Data::Config $dir.$file;
|
$config = Parse::PlainConfig->new('DELIM' => '=',
|
||||||
|
'FILE' => $dir.$file,
|
||||||
|
'PURGE' => 1);
|
||||||
unless (defined $config) {
|
unless (defined $config) {
|
||||||
print "Couldn't open it.";
|
print "Couldn't open the config file.";
|
||||||
$prereq = 0;
|
$prereq = 0;
|
||||||
} elsif ($config->param('dsn') =~ /\s$/) {
|
} elsif ($config->get('dsn') !~ /\DBI\:\w+\:\w+/) {
|
||||||
print "DSN cannot end with a space.";
|
|
||||||
$prereq = 0;
|
|
||||||
} elsif ($config->param('dsn') !~ /\DBI\:\w+\:\w+/) {
|
|
||||||
print "DSN is improperly formatted.";
|
print "DSN is improperly formatted.";
|
||||||
$prereq = 0;
|
$prereq = 0;
|
||||||
} elsif ($config->param('dbuser') =~ /\s$/) {
|
|
||||||
print "dbuser cannot end with a space.";
|
|
||||||
$prereq = 0;
|
|
||||||
} elsif ($config->param('dbpass') =~ /\s$/) {
|
|
||||||
print "dbpass cannot end with a space.";
|
|
||||||
$prereq = 0;
|
|
||||||
} elsif ($config->param('extras') =~ /\s$/) {
|
|
||||||
print "extras cannot end with a space.";
|
|
||||||
$prereq = 0;
|
|
||||||
} elsif ($config->param('uploadsPath') =~ /\s$/) {
|
|
||||||
print "uploadsPath cannot end with a space.";
|
|
||||||
$prereq = 0;
|
|
||||||
} elsif ($config->param('uploadsURL') =~ /\s$/) {
|
|
||||||
print "uploadsURL cannot end with a space.";
|
|
||||||
$prereq = 0;
|
|
||||||
} else {
|
} else {
|
||||||
print "OK\n";
|
print "OK\n";
|
||||||
}
|
}
|
||||||
|
|
@ -263,7 +247,7 @@ if ($error ne "") {
|
||||||
###################################
|
###################################
|
||||||
|
|
||||||
print "Uploads folder ........................... ";
|
print "Uploads folder ........................... ";
|
||||||
if (opendir(DIR,$config->param('uploadsPath'))) {
|
if (opendir(DIR,$config->get('uploadsPath'))) {
|
||||||
print "OK\n";
|
print "OK\n";
|
||||||
closedir(DIR);
|
closedir(DIR);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -276,7 +260,7 @@ if ($error ne "") {
|
||||||
|
|
||||||
print "Database driver .......................... ";
|
print "Database driver .......................... ";
|
||||||
my (@driver);
|
my (@driver);
|
||||||
@driver = split(/:/,$config->param('dsn'));
|
@driver = split(/:/,$config->get('dsn'));
|
||||||
if ($dbDrivers =~ m/$driver[1]/) {
|
if ($dbDrivers =~ m/$driver[1]/) {
|
||||||
print "OK\n";
|
print "OK\n";
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -289,7 +273,7 @@ if ($error ne "") {
|
||||||
|
|
||||||
print "Database connection ...................... ";
|
print "Database connection ...................... ";
|
||||||
my ($dbh, $test);
|
my ($dbh, $test);
|
||||||
unless (eval {$dbh = DBI->connect($config->param('dsn'),$config->param('dbuser'),$config->param('dbpass'))}) {
|
unless (eval {$dbh = DBI->connect($config->get('dsn'),$config->get('dbuser'),$config->get('dbpass'))}) {
|
||||||
print "Can't connect with info provided!\n";
|
print "Can't connect with info provided!\n";
|
||||||
} else {
|
} else {
|
||||||
print "OK\n";
|
print "OK\n";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue