diff options
author | VirtualTam <tamisier.aurelien@gmail.com> | 2015-07-11 12:48:24 +0200 |
---|---|---|
committer | VirtualTam <tamisier.aurelien@gmail.com> | 2015-07-11 12:48:24 +0200 |
commit | 1b73f35ebf690cdbc60e6e3423d9347634a841bd (patch) | |
tree | 72021ec006e5914ca5ad633d7181af7c3ec86947 | |
parent | 49ca75695019865a3c57323a1d5c3c8c62ca124f (diff) | |
parent | 50c9a12ee65e4c279af6f8e67f7202954af0f80c (diff) | |
download | Shaarli-1b73f35ebf690cdbc60e6e3423d9347634a841bd.tar.gz Shaarli-1b73f35ebf690cdbc60e6e3423d9347634a841bd.tar.zst Shaarli-1b73f35ebf690cdbc60e6e3423d9347634a841bd.zip |
Merge pull request #269 from virtualtam/fix/read-config
Fix: data/config.php was not imported
-rw-r--r-- | index.php | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -63,6 +63,11 @@ checkphpversion(); | |||
63 | error_reporting(E_ALL^E_WARNING); // See all error except warnings. | 63 | error_reporting(E_ALL^E_WARNING); // See all error except warnings. |
64 | //error_reporting(-1); // See all errors (for debugging only) | 64 | //error_reporting(-1); // See all errors (for debugging only) |
65 | 65 | ||
66 | // User configuration | ||
67 | if (is_file($GLOBALS['config']['CONFIG_FILE'])) { | ||
68 | require_once $GLOBALS['config']['CONFIG_FILE']; | ||
69 | } | ||
70 | |||
66 | // Shaarli library | 71 | // Shaarli library |
67 | require_once 'application/LinkDB.php'; | 72 | require_once 'application/LinkDB.php'; |
68 | require_once 'application/Utils.php'; | 73 | require_once 'application/Utils.php'; |
@@ -103,9 +108,10 @@ if (empty($GLOBALS['titleLink'])) $GLOBALS['titleLink']='?'; | |||
103 | // I really need to rewrite Shaarli with a proper configuation manager. | 108 | // I really need to rewrite Shaarli with a proper configuation manager. |
104 | 109 | ||
105 | // Run config screen if first run: | 110 | // Run config screen if first run: |
106 | if (!is_file($GLOBALS['config']['CONFIG_FILE'])) install(); | 111 | if (! is_file($GLOBALS['config']['CONFIG_FILE'])) { |
112 | install(); | ||
113 | } | ||
107 | 114 | ||
108 | require $GLOBALS['config']['CONFIG_FILE']; // Read login/password hash into $GLOBALS. | ||
109 | $GLOBALS['title'] = !empty($GLOBALS['title']) ? escape($GLOBALS['title']) : ''; | 115 | $GLOBALS['title'] = !empty($GLOBALS['title']) ? escape($GLOBALS['title']) : ''; |
110 | $GLOBALS['titleLink'] = !empty($GLOBALS['titleLink']) ? escape($GLOBALS['titleLink']) : ''; | 116 | $GLOBALS['titleLink'] = !empty($GLOBALS['titleLink']) ? escape($GLOBALS['titleLink']) : ''; |
111 | $GLOBALS['redirector'] = !empty($GLOBALS['redirector']) ? escape($GLOBALS['redirector']) : ''; | 117 | $GLOBALS['redirector'] = !empty($GLOBALS['redirector']) ? escape($GLOBALS['redirector']) : ''; |