1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-03 23:37:39 +02:00

[ticket/10223] Check optional before file_exists and correct require path

PHPBB3-10223
This commit is contained in:
Nils Adermann
2011-06-18 23:48:37 +02:00
parent 1b0821a11b
commit d3f1b60292
2 changed files with 4 additions and 4 deletions

View File

@@ -45,7 +45,7 @@ function phpbb_require_updated($path, $optional = false)
{ {
require($new_path); require($new_path);
} }
else if (file_exists($old_path) || !$optional) else if (!$optional || file_exists($old_path))
{ {
require($old_path); require($old_path);
} }
@@ -89,7 +89,7 @@ require($phpbb_root_path . 'includes/auth.' . $phpEx);
require($phpbb_root_path . 'includes/functions.' . $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/functions_admin.' . $phpEx);
require($phpbb_root_path . 'includes/constants.' . $phpEx); require($phpbb_root_path . 'includes/constants.' . $phpEx);

View File

@@ -35,7 +35,7 @@ function phpbb_require_updated($path, $optional = false)
{ {
require($new_path); require($new_path);
} }
else if (file_exists($old_path) || !$optional) else if (!$optional || file_exists($old_path))
{ {
require($old_path); require($old_path);
} }
@@ -74,7 +74,7 @@ else
// Include essential scripts // Include essential scripts
require($phpbb_root_path . 'includes/functions.' . $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);
include($phpbb_root_path . 'includes/auth.' . $phpEx); include($phpbb_root_path . 'includes/auth.' . $phpEx);
include($phpbb_root_path . 'includes/session.' . $phpEx); include($phpbb_root_path . 'includes/session.' . $phpEx);