mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-05-07 22:42:21 +03:00
Detect lack of SQLite3 support in PHP + minor spelling fixes.
This commit is contained in:
parent
94f722b4d5
commit
14e6f44495
1 changed files with 8 additions and 3 deletions
|
@ -5,7 +5,7 @@ include('config.inc.php');
|
|||
$blocklogin = FALSE;
|
||||
|
||||
if ((!isset($apipass) or empty($apipass)) or (!isset($apiip) or empty($apiip)) or (!isset($apiport) or empty($apiport))) {
|
||||
$errormsg = "You need to configure your the setting for using the PowerDNS API";
|
||||
$errormsg = "You need to configure your settings for the PowerDNS API";
|
||||
$blocklogin = TRUE;
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ if (!isset($authmethod) or !preg_match('/^(xapikey|userpass|auto)$/', $authmetho
|
|||
}
|
||||
|
||||
if (!isset($authdb)) {
|
||||
$errormsg = "You did not configure a value for the setting \$authdb in yor config";
|
||||
$errormsg = "You did not configure a value for the setting \$authdb in your config";
|
||||
$blocklogin = TRUE;
|
||||
}
|
||||
|
||||
|
@ -26,9 +26,14 @@ if (function_exists('curl_init') === FALSE) {
|
|||
$blocklogin = TRUE;
|
||||
}
|
||||
|
||||
if (class_exists('SQLite3') === FALSE) {
|
||||
$errormsg = "You need PHP SQLite3 to run nsedit";
|
||||
$blocklogin = TRUE;
|
||||
}
|
||||
|
||||
$defaults['defaulttype'] = ucfirst(strtolower($defaults['defaulttype']));
|
||||
|
||||
if (isset($authdb) && !file_exists($authdb)) {
|
||||
if (isset($authdb) && !file_exists($authdb) && class_exists('SQLite3')) {
|
||||
is_dir(dirname($authdb)) || mkdir(dirname($authdb));
|
||||
$db = new SQLite3($authdb, SQLITE3_OPEN_CREATE|SQLITE3_OPEN_READWRITE);
|
||||
$createsql = file_get_contents('includes/scheme.sql');
|
||||
|
|
Loading…
Add table
Reference in a new issue