From 63f11a802447c8641bcb9d645000232dc7181da9 Mon Sep 17 00:00:00 2001 From: Victor Nagy Date: Tue, 14 May 2013 23:04:32 +0200 Subject: [PATCH] [ticket/11536] Fixed incorrect removal of "install" in script_path Earlier the script would incorrectly remove the word "install" from the script_path when trying to remove the last folder in the path named "/install". This would lead to issues when the path you are installing phpBB contained "install". For example "/install_test/install" would become "/_test". This change gets the parent folder instead of replacing all "install". $name contains /install_test/install/index.php from start and running dirname() gives /install_test/install. Running dirname once more gives the parent folder of install, /install_test. PHPBB3-11536 --- phpBB/install/install_install.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 0575b58d92..4618cff855 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -1025,8 +1025,8 @@ class install_install extends module } // Replace backslashes and doubled slashes (could happen on some proxy setups) - $name = str_replace(array('\\', '//', '/install'), '/', $name); - $data['script_path'] = trim(dirname($name)); + $name = str_replace(array('\\', '//'), '/', $name); + $data['script_path'] = trim(dirname(dirname($name))); } foreach ($this->advanced_config_options as $config_key => $vars)