diff options
author | Sebastien SAUVAGE <sebsauvage@sebsauvage.net> | 2013-03-04 21:02:24 +0100 |
---|---|---|
committer | Sebastien SAUVAGE <sebsauvage@sebsauvage.net> | 2013-03-04 21:02:24 +0100 |
commit | 8a80e4fe07c2d116ad87e7d0699859d10229607e (patch) | |
tree | c1fdb7526931d34cf75aac5d313108cc22106e00 /index.php | |
parent | 22701e2d0b49cd1c393847676e62149ba2ccda03 (diff) | |
download | Shaarli-8a80e4fe07c2d116ad87e7d0699859d10229607e.tar.gz Shaarli-8a80e4fe07c2d116ad87e7d0699859d10229607e.tar.zst Shaarli-8a80e4fe07c2d116ad87e7d0699859d10229607e.zip |
Got rid of small display bugs before installation.
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -87,19 +87,21 @@ if ($GLOBALS['config']['ENABLE_LOCALCACHE']) | |||
87 | if (!is_file($GLOBALS['config']['CACHEDIR'].'/.htaccess')) { file_put_contents($GLOBALS['config']['CACHEDIR'].'/.htaccess',"Allow from none\nDeny from all\n"); } // Protect data files. | 87 | if (!is_file($GLOBALS['config']['CACHEDIR'].'/.htaccess')) { file_put_contents($GLOBALS['config']['CACHEDIR'].'/.htaccess',"Allow from none\nDeny from all\n"); } // Protect data files. |
88 | } | 88 | } |
89 | 89 | ||
90 | // Run config screen if first run: | ||
91 | if (!is_file($GLOBALS['config']['CONFIG_FILE'])) install(); | ||
92 | |||
93 | require $GLOBALS['config']['CONFIG_FILE']; // Read login/password hash into $GLOBALS. | ||
94 | |||
95 | // Handling of old config file which do not have the new parameters. | 90 | // Handling of old config file which do not have the new parameters. |
96 | if (empty($GLOBALS['title'])) $GLOBALS['title']='Shared links on '.htmlspecialchars(indexUrl()); | 91 | if (empty($GLOBALS['title'])) $GLOBALS['title']='Shared links on '.htmlspecialchars(indexUrl()); |
97 | if (empty($GLOBALS['timezone'])) $GLOBALS['timezone']=date_default_timezone_get(); | 92 | if (empty($GLOBALS['timezone'])) $GLOBALS['timezone']=date_default_timezone_get(); |
93 | if (empty($GLOBALS['redirector'])) $GLOBALS['redirector']=''; | ||
98 | if (empty($GLOBALS['disablesessionprotection'])) $GLOBALS['disablesessionprotection']=false; | 94 | if (empty($GLOBALS['disablesessionprotection'])) $GLOBALS['disablesessionprotection']=false; |
99 | if (empty($GLOBALS['disablejquery'])) $GLOBALS['disablejquery']=false; | 95 | if (empty($GLOBALS['disablejquery'])) $GLOBALS['disablejquery']=false; |
100 | if (empty($GLOBALS['privateLinkByDefault'])) $GLOBALS['privateLinkByDefault']=false; | 96 | if (empty($GLOBALS['privateLinkByDefault'])) $GLOBALS['privateLinkByDefault']=false; |
101 | // I really need to rewrite Shaarli with a proper configuation manager. | 97 | // I really need to rewrite Shaarli with a proper configuation manager. |
102 | 98 | ||
99 | // Run config screen if first run: | ||
100 | if (!is_file($GLOBALS['config']['CONFIG_FILE'])) install(); | ||
101 | |||
102 | require $GLOBALS['config']['CONFIG_FILE']; // Read login/password hash into $GLOBALS. | ||
103 | |||
104 | |||
103 | autoLocale(); // Sniff browser language and set date format accordingly. | 105 | autoLocale(); // Sniff browser language and set date format accordingly. |
104 | header('Content-Type: text/html; charset=utf-8'); // We use UTF-8 for proper international characters handling. | 106 | header('Content-Type: text/html; charset=utf-8'); // We use UTF-8 for proper international characters handling. |
105 | 107 | ||