Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions administrator/includes/framework.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 11 additions & 9 deletions includes/framework.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down