From 8a80e4fe07c2d116ad87e7d0699859d10229607e Mon Sep 17 00:00:00 2001 From: Sebastien SAUVAGE Date: Mon, 4 Mar 2013 21:02:24 +0100 Subject: [PATCH] Got rid of small display bugs before installation. --- index.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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. -- 2.41.0