aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorSebastien SAUVAGE <sebsauvage@sebsauvage.net>2013-03-04 21:02:24 +0100
committerSebastien SAUVAGE <sebsauvage@sebsauvage.net>2013-03-04 21:02:24 +0100
commit8a80e4fe07c2d116ad87e7d0699859d10229607e (patch)
treec1fdb7526931d34cf75aac5d313108cc22106e00 /index.php
parent22701e2d0b49cd1c393847676e62149ba2ccda03 (diff)
downloadShaarli-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.php12
1 files 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'])
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:
91if (!is_file($GLOBALS['config']['CONFIG_FILE'])) install();
92
93require $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.
96if (empty($GLOBALS['title'])) $GLOBALS['title']='Shared links on '.htmlspecialchars(indexUrl()); 91if (empty($GLOBALS['title'])) $GLOBALS['title']='Shared links on '.htmlspecialchars(indexUrl());
97if (empty($GLOBALS['timezone'])) $GLOBALS['timezone']=date_default_timezone_get(); 92if (empty($GLOBALS['timezone'])) $GLOBALS['timezone']=date_default_timezone_get();
93if (empty($GLOBALS['redirector'])) $GLOBALS['redirector']='';
98if (empty($GLOBALS['disablesessionprotection'])) $GLOBALS['disablesessionprotection']=false; 94if (empty($GLOBALS['disablesessionprotection'])) $GLOBALS['disablesessionprotection']=false;
99if (empty($GLOBALS['disablejquery'])) $GLOBALS['disablejquery']=false; 95if (empty($GLOBALS['disablejquery'])) $GLOBALS['disablejquery']=false;
100if (empty($GLOBALS['privateLinkByDefault'])) $GLOBALS['privateLinkByDefault']=false; 96if (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:
100if (!is_file($GLOBALS['config']['CONFIG_FILE'])) install();
101
102require $GLOBALS['config']['CONFIG_FILE']; // Read login/password hash into $GLOBALS.
103
104
103autoLocale(); // Sniff browser language and set date format accordingly. 105autoLocale(); // Sniff browser language and set date format accordingly.
104header('Content-Type: text/html; charset=utf-8'); // We use UTF-8 for proper international characters handling. 106header('Content-Type: text/html; charset=utf-8'); // We use UTF-8 for proper international characters handling.
105 107