From d3f1b6029248d20d4a3a4bc2f3684f8aad88559d Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Sat, 18 Jun 2011 23:48:37 +0200 Subject: [PATCH] [ticket/10223] Check optional before file_exists and correct require path PHPBB3-10223 --- phpBB/install/database_update.php | 4 ++-- phpBB/install/index.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 0d424d0d88..337f08b626 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -45,7 +45,7 @@ function phpbb_require_updated($path, $optional = false) { require($new_path); } - else if (file_exists($old_path) || !$optional) + else if (!$optional || file_exists($old_path)) { require($old_path); } @@ -89,7 +89,7 @@ require($phpbb_root_path . 'includes/auth.' . $phpEx); require($phpbb_root_path . 'includes/functions.' . $phpEx); -phpbb_require_updated($phpbb_root_path . 'includes/functions_content.' . $phpEx, true); +phpbb_require_updated('includes/functions_content.' . $phpEx, true); require($phpbb_root_path . 'includes/functions_admin.' . $phpEx); require($phpbb_root_path . 'includes/constants.' . $phpEx); diff --git a/phpBB/install/index.php b/phpBB/install/index.php index c82c3dbc13..5189cbfc8e 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -35,7 +35,7 @@ function phpbb_require_updated($path, $optional = false) { require($new_path); } - else if (file_exists($old_path) || !$optional) + else if (!$optional || file_exists($old_path)) { require($old_path); } @@ -74,7 +74,7 @@ else // Include essential scripts require($phpbb_root_path . 'includes/functions.' . $phpEx); -phpbb_require_updated($phpbb_root_path . 'includes/functions_content.' . $phpEx, true); +phpbb_require_updated('includes/functions_content.' . $phpEx, true); include($phpbb_root_path . 'includes/auth.' . $phpEx); include($phpbb_root_path . 'includes/session.' . $phpEx);