Fix: data/config.php was not imported
Relates to #255 Signed-off-by: VirtualTam <virtualtam@flibidi.net>
This commit is contained in:
parent
49ca756950
commit
50c9a12ee6
1 changed files with 8 additions and 2 deletions
10
index.php
10
index.php
|
@ -63,6 +63,11 @@
|
||||||
error_reporting(E_ALL^E_WARNING); // See all error except warnings.
|
error_reporting(E_ALL^E_WARNING); // See all error except warnings.
|
||||||
//error_reporting(-1); // See all errors (for debugging only)
|
//error_reporting(-1); // See all errors (for debugging only)
|
||||||
|
|
||||||
|
// User configuration
|
||||||
|
if (is_file($GLOBALS['config']['CONFIG_FILE'])) {
|
||||||
|
require_once $GLOBALS['config']['CONFIG_FILE'];
|
||||||
|
}
|
||||||
|
|
||||||
// Shaarli library
|
// Shaarli library
|
||||||
require_once 'application/LinkDB.php';
|
require_once 'application/LinkDB.php';
|
||||||
require_once 'application/Utils.php';
|
require_once 'application/Utils.php';
|
||||||
|
@ -103,9 +108,10 @@ function stripslashes_deep($value) { $value = is_array($value) ? array_map('stri
|
||||||
// I really need to rewrite Shaarli with a proper configuation manager.
|
// I really need to rewrite Shaarli with a proper configuation manager.
|
||||||
|
|
||||||
// Run config screen if first run:
|
// Run config screen if first run:
|
||||||
if (!is_file($GLOBALS['config']['CONFIG_FILE'])) install();
|
if (! is_file($GLOBALS['config']['CONFIG_FILE'])) {
|
||||||
|
install();
|
||||||
|
}
|
||||||
|
|
||||||
require $GLOBALS['config']['CONFIG_FILE']; // Read login/password hash into $GLOBALS.
|
|
||||||
$GLOBALS['title'] = !empty($GLOBALS['title']) ? escape($GLOBALS['title']) : '';
|
$GLOBALS['title'] = !empty($GLOBALS['title']) ? escape($GLOBALS['title']) : '';
|
||||||
$GLOBALS['titleLink'] = !empty($GLOBALS['titleLink']) ? escape($GLOBALS['titleLink']) : '';
|
$GLOBALS['titleLink'] = !empty($GLOBALS['titleLink']) ? escape($GLOBALS['titleLink']) : '';
|
||||||
$GLOBALS['redirector'] = !empty($GLOBALS['redirector']) ? escape($GLOBALS['redirector']) : '';
|
$GLOBALS['redirector'] = !empty($GLOBALS['redirector']) ? escape($GLOBALS['redirector']) : '';
|
||||||
|
|
Loading…
Reference in a new issue