diff --git a/administrator/includes/framework.php b/administrator/includes/framework.php index 248f3fb7c7bc1..76e25c9e46619 100644 --- a/administrator/includes/framework.php +++ b/administrator/includes/framework.php @@ -15,25 +15,27 @@ // System includes require_once JPATH_LIBRARIES . '/bootstrap.php'; -// Installation check, and check on removal of the install directory. +// Installation check, and check on removal of the install directory if ( !file_exists(JPATH_CONFIGURATION . '/configuration.php') || (filesize(JPATH_CONFIGURATION . '/configuration.php') < 10) || (file_exists(JPATH_INSTALLATION . '/index.php') && (false === (new Version())->isInDevelopmentState())) ) { - if (file_exists(JPATH_INSTALLATION . '/index.php')) { - if (JPATH_ROOT === JPATH_PUBLIC) { - header('Location: ../installation/index.php'); - } else { - echo 'Installation from a public folder is not supported, revert your Server configuration to point at the Joomla\'s root folder to continue.'; - } - - exit(); - } else { + if (!file_exists(JPATH_INSTALLATION . '/index.php')) { echo 'No configuration file found and no installation code available. Exiting...'; exit; } + + if (JPATH_ROOT === JPATH_PUBLIC) { + header('Location: ../installation/index.php'); + + exit; + } + + echo 'Installation from a public folder is not supported, revert your Server configuration to point at Joomla\'s root folder to continue.'; + + exit; } // Pre-Load configuration. Don't remove the Output Buffering due to BOM issues, see JCode 26026 diff --git a/includes/framework.php b/includes/framework.php index 2ea0e5dc4baf4..47f179c555eb1 100644 --- a/includes/framework.php +++ b/includes/framework.php @@ -15,25 +15,27 @@ // System includes require_once JPATH_LIBRARIES . '/bootstrap.php'; -// Installation check, and check on removal of the install directory. +// Installation check, and check on removal of the install directory if ( !file_exists(JPATH_CONFIGURATION . '/configuration.php') || (filesize(JPATH_CONFIGURATION . '/configuration.php') < 10) || (file_exists(JPATH_INSTALLATION . '/index.php') && (false === (new Version())->isInDevelopmentState())) ) { - if (file_exists(JPATH_INSTALLATION . '/index.php')) { - if (JPATH_ROOT === JPATH_PUBLIC) { - header('Location: ' . substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], 'index.php')) . 'installation/index.php'); - } else { - echo 'Installation from a public folder is not supported, revert your Server configuration to point at the Joomla\'s root folder to continue.'; - } + if (!file_exists(JPATH_INSTALLATION . '/index.php')) { + echo 'No configuration file found and no installation code available. Exiting...'; exit; - } else { - echo 'No configuration file found and no installation code available. Exiting...'; + } + + if (JPATH_ROOT === JPATH_PUBLIC) { + header('Location: ' . substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], 'index.php')) . 'installation/index.php'); exit; } + + echo 'Installation from a public folder is not supported, revert your Server configuration to point at Joomla\'s root folder to continue.'; + + exit; } // Pre-Load configuration. Don't remove the Output Buffering due to BOM issues, see JCode 26026