aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
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