diff --git a/main/inc/global_error_message.inc.php b/main/inc/global_error_message.inc.php index 864e5a9718..63691c9aae 100755 --- a/main/inc/global_error_message.inc.php +++ b/main/inc/global_error_message.inc.php @@ -115,7 +115,7 @@ if (is_int($global_error_code) && $global_error_code > 0) { } $click_to_install = substr($InstallationDescription, 0, $pos); $read_installation_guide = substr($InstallationDescription, $pos + 2); - $InstallationDescription = '

+ $InstallationDescription = '

'.$read_installation_guide.''; $global_error_message['description'] = $InstallationDescription; break; diff --git a/main/inc/lib/main_api.lib.php b/main/inc/lib/main_api.lib.php index cc558e244d..40a5dc84cd 100755 --- a/main/inc/lib/main_api.lib.php +++ b/main/inc/lib/main_api.lib.php @@ -402,12 +402,11 @@ function api_get_path($path_type, $path = null) { // // Support for the installation process. - // Developers might use the function api_fet_path() directly or indirectly (this is difficult to be traced), at the moment when + // Developers might use the function api_get_path() directly or indirectly (this is difficult to be traced), at the moment when // configuration has not been created yet. This is why this function should be upgraded to return correct results in this case. // - if (!file_exists($include_path_sys.'/conf/configuration.php')) { - $requested_page_rel = api_get_self(); - if (($pos = strpos($requested_page_rel, 'main/install')) !== false) { + if (defined('SYSTEM_INSTALLATION') && SYSTEM_INSTALLATION) { + if (($pos = strpos(($requested_page_rel = api_get_self()), 'main/install')) !== false) { $root_rel = substr($requested_page_rel, 0, $pos); // See http://www.mediawiki.org/wiki/Manual:$wgServer $server_protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http'; diff --git a/main/install/index.php b/main/install/index.php index 9a2ce1e2e9..20ab63499c 100755 --- a/main/install/index.php +++ b/main/install/index.php @@ -15,6 +15,20 @@ ============================================================================== */ +/* +============================================================================== + CONSTANTS +============================================================================== +*/ + +define('SYSTEM_INSTALLATION', 1); +define('MAX_COURSE_TRANSFER', 100); +define('INSTALL_TYPE_UPDATE', 'update'); +define('FORM_FIELD_DISPLAY_LENGTH', 40); +define('DATABASE_FORM_FIELD_DISPLAY_LENGTH', 25); +define('MAX_FORM_FIELD_LENGTH', 80); +define('DEFAULT_LANGUAGE', 'english'); // TODO: To be examined. + /* ============================================================================== PHP VERSION CHECK @@ -96,15 +110,6 @@ api_set_internationalization_default_encoding($charset); // Page encoding initialization. header('Content-Type: text/html; charset='. api_get_system_encoding()); -// Some constants -define('SYSTEM_INSTALLATION', 1); -define('MAX_COURSE_TRANSFER', 100); -define('INSTALL_TYPE_UPDATE', 'update'); -define('FORM_FIELD_DISPLAY_LENGTH', 40); -define('DATABASE_FORM_FIELD_DISPLAY_LENGTH', 25); -define('MAX_FORM_FIELD_LENGTH', 80); -define('DEFAULT_LANGUAGE', 'english'); // TODO: To be examined. - // Setting the error reporting levels. error_reporting(E_COMPILE_ERROR | E_ERROR | E_CORE_ERROR);