Index: branches/5.2.x/core/install.php =================================================================== diff -u -N -r14671 -r14692 --- branches/5.2.x/core/install.php (.../install.php) (revision 14671) +++ branches/5.2.x/core/install.php (.../install.php) (revision 14692) @@ -1,6 +1,6 @@ toolkit->getSystemConfig('Misc', 'WriteablePath') ) { - // set global writable folder when such setting is missing $this->toolkit->setSystemConfig('Misc', 'WriteablePath', $this->toolkit->defaultWritablePath); - $this->toolkit->SaveConfig(true); // immediately save, because this path will be used in Application later } if ( !$this->toolkit->getSystemConfig('Misc', 'RestrictedPath') ) { $this->toolkit->setSystemConfig('Misc', 'RestrictedPath', $this->toolkit->getSystemConfig('Misc', 'WriteablePath') . DIRECTORY_SEPARATOR . '.restricted'); + } + + if ( !$this->toolkit->getSystemConfig('Misc', 'WebsitePath') ) { + $this->toolkit->setSystemConfig('Misc', 'WebsitePath', $base_path); + } + + if ( $this->toolkit->systemConfigChanged ) { + // immediately save, because this paths will be used in kApplication class later $this->toolkit->SaveConfig(true); } @@ -801,7 +807,6 @@ $config_values = Array ( 'RootPass' => $password, - 'Site_Path' => BASE_PATH.'/', // set Site_Path (for SSL & old in-portal code) 'Backup_Path' => FULL_PATH . $this->toolkit->getSystemConfig('Misc', 'WriteablePath') . DIRECTORY_SEPARATOR . 'backupdata', 'Smtp_AdminMailFrom' => 'portal@' . $this->toolkit->getSystemConfig('Misc', 'Domain') ); @@ -876,7 +881,7 @@ FROM ' . $theme_table . ' WHERE ' . $theme_idfield . ' = ' . $theme_id; $theme_name = $this->Conn->GetOne($sql); - $site_path = $this->Application->ConfigValue('Site_Path'); + $site_path = $this->toolkit->getSystemConfig('Misc', 'WebsitePath') . '/'; $file_helper =& $this->Application->recallObject('FileHelper'); /* @var $file_helper FileHelper */ @@ -1242,16 +1247,18 @@ /** * Show next step screen * + * @param string $error_message + * @return void */ function Done($error_message = null) { - if (isset($error_message)) { + if ( isset($error_message) ) { $this->errorMessage = $error_message; } - include_once (FULL_PATH.'/'.REL_PATH.'/install/incs/install.tpl'); + include_once (FULL_PATH . '/' . REL_PATH . '/install/incs/install.tpl'); - if (isset($this->Application)) { + if ( isset($this->Application) ) { $this->Application->Done(); } @@ -1662,9 +1669,9 @@ * @param string $errstr * @param string $errfile * @param int $errline - * @param Array $errcontext + * @param Array|string $errcontext */ - function ErrorHandler($errno, $errstr, $errfile = '', $errline = '', $errcontext = '') + function ErrorHandler($errno, $errstr, $errfile = '', $errline = 0, $errcontext = '') { if ($errno == E_USER_ERROR) { // only react on user fatal errors