use newer method (return type is consistent)

pull/229/head
David Goodwin 7 years ago
parent 766c947190
commit 59dc05d746

@ -212,12 +212,13 @@ if ($f_sqlite_open == 1) {
// Database connection // Database connection
// //
if ($config_loaded) { if ($config_loaded) {
list($link, $error_text) = db_connect(true); list($link, $error_text) = db_connect_with_errors();
if ($error_text == "") {
if (!empty($link) && $error_text == "") {
print "<li>Testing database connection (using {$CONF['database_type']}) - OK</li>"; print "<li>Testing database connection (using {$CONF['database_type']}) - OK</li>";
} else { } else {
print "<li><b>Error: Can't connect to database</b><br />\n"; print "<li><b>Error: Can't connect to database</b><br />\n";
print "Please edit the \$CONF['database_*'] parameters in config.local.php.\n"; print "Please check the \$CONF['database_*'] parameters in config.local.php.\n";
print "$error_text</li>\n"; print "$error_text</li>\n";
$error ++; $error ++;
} }

Loading…
Cancel
Save