From: Sebastien SAUVAGE Date: Mon, 4 Mar 2013 20:02:24 +0000 (+0100) Subject: Got rid of small display bugs before installation. X-Git-Tag: v0.0.41beta~4 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=8a80e4fe07c2d116ad87e7d0699859d10229607e;hp=22701e2d0b49cd1c393847676e62149ba2ccda03;p=github%2Fshaarli%2FShaarli.git Got rid of small display bugs before installation. --- diff --git a/index.php b/index.php index 0b4d454d..8197719a 100644 --- a/index.php +++ b/index.php @@ -87,19 +87,21 @@ if ($GLOBALS['config']['ENABLE_LOCALCACHE']) if (!is_file($GLOBALS['config']['CACHEDIR'].'/.htaccess')) { file_put_contents($GLOBALS['config']['CACHEDIR'].'/.htaccess',"Allow from none\nDeny from all\n"); } // Protect data files. } -// Run config screen if first run: -if (!is_file($GLOBALS['config']['CONFIG_FILE'])) install(); - -require $GLOBALS['config']['CONFIG_FILE']; // Read login/password hash into $GLOBALS. - // Handling of old config file which do not have the new parameters. if (empty($GLOBALS['title'])) $GLOBALS['title']='Shared links on '.htmlspecialchars(indexUrl()); if (empty($GLOBALS['timezone'])) $GLOBALS['timezone']=date_default_timezone_get(); +if (empty($GLOBALS['redirector'])) $GLOBALS['redirector']=''; if (empty($GLOBALS['disablesessionprotection'])) $GLOBALS['disablesessionprotection']=false; if (empty($GLOBALS['disablejquery'])) $GLOBALS['disablejquery']=false; if (empty($GLOBALS['privateLinkByDefault'])) $GLOBALS['privateLinkByDefault']=false; // I really need to rewrite Shaarli with a proper configuation manager. +// Run config screen if first run: +if (!is_file($GLOBALS['config']['CONFIG_FILE'])) install(); + +require $GLOBALS['config']['CONFIG_FILE']; // Read login/password hash into $GLOBALS. + + autoLocale(); // Sniff browser language and set date format accordingly. header('Content-Type: text/html; charset=utf-8'); // We use UTF-8 for proper international characters handling.