[fix] install doesn't work
This commit is contained in:
parent
927e67a6a9
commit
51f119e569
1 changed files with 8 additions and 6 deletions
14
index.php
14
index.php
|
@ -45,10 +45,9 @@
|
|||
// -----------------------------------------------------------------------------------------------
|
||||
// You should not touch below (or at your own risks !)
|
||||
// Optionnal config file.
|
||||
// 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.
|
||||
if(file_exists($GLOBALS['config']['CONFIG_FILE'])){
|
||||
require $GLOBALS['config']['CONFIG_FILE']; // Read login/password hash into $GLOBALS.
|
||||
}
|
||||
|
||||
if (is_file($GLOBALS['config']['DATADIR'].'/options.php')){
|
||||
require($GLOBALS['config']['DATADIR'].'/options.php');
|
||||
|
@ -129,6 +128,9 @@ function stripslashes_deep($value) { $value = is_array($value) ? array_map('stri
|
|||
if (empty($GLOBALS['privateLinkByDefault'])) $GLOBALS['privateLinkByDefault']=false;
|
||||
if (empty($GLOBALS['titleLink'])) $GLOBALS['titleLink']='?';
|
||||
|
||||
// Run config screen if first run:
|
||||
if (!is_file($GLOBALS['config']['CONFIG_FILE'])) install();
|
||||
|
||||
// a token depending of deployment salt, user password, and the current ip
|
||||
define('STAY_SIGNED_IN_TOKEN', sha1($GLOBALS['hash'].$_SERVER["REMOTE_ADDR"].$GLOBALS['salt']));
|
||||
|
||||
|
@ -2438,11 +2440,11 @@ function writeConfig()
|
|||
if (is_file($GLOBALS['config']['CONFIG_FILE']) && !isLoggedIn()) die('You are not authorized to alter config.'); // Only logged in user can alter config.
|
||||
$config = "<?php\n";
|
||||
$config .= '$GLOBALS[\'login\']='.var_export($GLOBALS['login'],true).';'."\n";
|
||||
$confog .= '$GLOBALS[\'hash\'] = '.var_export($GLOBALS['hash'],true).';'."\n";
|
||||
$config .= '$GLOBALS[\'hash\'] = '.var_export($GLOBALS['hash'],true).';'."\n";
|
||||
$config .= '$GLOBALS[\'salt\']='.var_export($GLOBALS['salt'],true).';'."\n";
|
||||
$config .='$GLOBALS[\'timezone\'] = '.var_export($GLOBALS['timezone'],true).';'."\n";
|
||||
$config .= 'date_default_timezone_set('.var_export($GLOBALS['timezone'],true).');'."\n";
|
||||
$confif .= '$GLOBALS[\'title\']='.var_export($GLOBALS['title'],true).';'."\n";
|
||||
$config .= '$GLOBALS[\'title\']='.var_export($GLOBALS['title'],true).';'."\n";
|
||||
$config .= '$GLOBALS[\'titleLink\'] = '.var_export($GLOBALS['titleLink'],true).';'."\n";
|
||||
$config .= '$GLOBALS[\'redirector\'] = '.var_export($GLOBALS['redirector'],true).';'."\n";
|
||||
$config .= '$GLOBALS[\'disablesessionprotection\'] = '.var_export($GLOBALS['disablesessionprotection'],true).';'."\n";
|
||||
|
|
Loading…
Reference in a new issue