Index: install.php =================================================================== --- install.php (revision 14670) +++ install.php (working copy) @@ -784,7 +784,6 @@ if ($domain != '') { if (strstr($domain, $license_domain) || $modules_helper->_IsLocalSite($domain)) { $this->toolkit->setSystemConfig('Misc', 'Domain', $domain); - $this->toolkit->SaveConfig(); } else { $this->errorMessage = 'Domain name entered does not match domain name in the license!'; @@ -793,6 +792,8 @@ else { $this->errorMessage = 'Please enter valid domain!'; } + $this->toolkit->setSystemConfig('Misc', 'WebsitePath', BASE_PATH.'/'); + $this->toolkit->SaveConfig(); break; case 'root_password': @@ -801,7 +802,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 +876,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 */ Index: install/install_data.sql =================================================================== --- install/install_data.sql (revision 14670) +++ install/install_data.sql (working copy) @@ -29,19 +29,18 @@ # Section "in-portal:configure_advanced": INSERT INTO ConfigurationValues VALUES(DEFAULT, 'PageHitCounter', '0', 'In-Portal', 'in-portal:configure_advanced', '', '', '', NULL, NULL, 0, 0, 0, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Site_Path', '/', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_PathToWebsite', 'text', '', '', 10.01, 0, 1, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseModRewrite', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_use_modrewrite', 'checkbox', '', '', 10.02, 0, 1, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ModRewriteUrlEnding', '.html', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ModRewriteUrlEnding', 'select', '', '=+||/=+/||.html=+.html', 10.021, 0, 0, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ForceModRewriteUrlEnding', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ForceModRewriteUrlEnding', 'checkbox', '', NULL, 10.022, 0, 0, 'la_hint_ForceModRewriteUrlEnding'); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseContentLanguageNegotiation', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_UseContentLanguageNegotiation', 'checkbox', '', '', 10.023, 0, 0, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'cms_DefaultDesign', '#default_design#', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_DefaultDesignTemplate', 'text', NULL, NULL, 10.03, 0, 0, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ErrorTemplate', 'error_notfound', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_error_template', 'text', '', '', 10.04, 0, 0, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'NoPermissionTemplate', 'no_permission', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_nopermission_template', 'text', '', '', 10.05, 0, 0, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UsePageHitCounter', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_UsePageHitCounter', 'checkbox', '', '', 10.06, 0, 0, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ForceImageMagickResize', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ForceImageMagickResize', 'checkbox', '', '', 10.07, 0, 0, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CheckStopWords', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_CheckStopWords', 'checkbox', '', '', 10.08, 0, 0, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseVisitorTracking', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_UseVisitorTracking', 'checkbox', '', '', 10.09, 0, 0, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'cms_DefaultTrackingCode', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_DefaultTrackingCode', 'textarea', NULL, 'COLS=40 ROWS=5', 10.10, 0, 0, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseModRewrite', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_use_modrewrite', 'checkbox', '', '', 10.01, 0, 1, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ModRewriteUrlEnding', '.html', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ModRewriteUrlEnding', 'select', '', '=+||/=+/||.html=+.html', 10.011, 0, 0, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ForceModRewriteUrlEnding', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ForceModRewriteUrlEnding', 'checkbox', '', NULL, 10.012, 0, 0, 'la_hint_ForceModRewriteUrlEnding'); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseContentLanguageNegotiation', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_UseContentLanguageNegotiation', 'checkbox', '', '', 10.013, 0, 0, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'cms_DefaultDesign', '#default_design#', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_DefaultDesignTemplate', 'text', NULL, NULL, 10.02, 0, 0, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ErrorTemplate', 'error_notfound', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_error_template', 'text', '', '', 10.03, 0, 0, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'NoPermissionTemplate', 'no_permission', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_nopermission_template', 'text', '', '', 10.04, 0, 0, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UsePageHitCounter', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_UsePageHitCounter', 'checkbox', '', '', 10.05, 0, 0, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ForceImageMagickResize', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ForceImageMagickResize', 'checkbox', '', '', 10.06, 0, 0, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CheckStopWords', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_CheckStopWords', 'checkbox', '', '', 10.07, 0, 0, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseVisitorTracking', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_UseVisitorTracking', 'checkbox', '', '', 10.08, 0, 0, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'cms_DefaultTrackingCode', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_DefaultTrackingCode', 'textarea', NULL, 'COLS=40 ROWS=5', 10.09, 0, 0, NULL); INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CookieSessions', '2', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_prompt_session_management', 'select', NULL, '0=lu_opt_QueryString||1=lu_opt_Cookies||2=lu_opt_AutoDetect', 20.01, 0, 1, NULL); INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SessionCookieName', 'sid', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_prompt_session_cookie_name', 'text', '', '', 20.02, 0, 1, NULL); INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SessionCookieDomains', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_config_SessionCookieDomains', 'textarea', '', 'rows="5" cols="40"', 20.021, 0, 0, NULL); Index: install/step_templates/fix_paths.tpl =================================================================== --- install/step_templates/fix_paths.tpl (revision 14670) +++ install/step_templates/fix_paths.tpl (working copy) @@ -1,5 +1,5 @@ ConfigValue('Site_Path'), '/') . $prefix . '/'; + return 'http://' . $domain . ($add_port && defined('PORT') ? ':' . PORT : '') . BASE_PATH . $prefix . '/'; } function Redirect($t = '', $params = Array(), $prefix = '', $index_file = null) Index: kernel/startup.php =================================================================== --- kernel/startup.php (revision 14670) +++ kernel/startup.php (working copy) @@ -40,7 +40,7 @@ $relative_path = REL_PATH; } - $ps = rtrim(preg_replace('/' . preg_quote(rtrim($relative_path, '/'), '/') . '$/', '', str_replace('\\', '/', dirname($_SERVER['PHP_SELF']))), '/'); + $ps = rtrim( php_sapi_name() == 'cli' ? $vars['WebsitePath'] : preg_replace('/' . preg_quote(rtrim($relative_path, '/'), '/') . '$/', '', str_replace('\\', '/', dirname($_SERVER['PHP_SELF']))), '/'); define('BASE_PATH', $ps); # New path detection method: end