mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-03 15:27:42 +02:00
[ticket/10223] Check optional before file_exists and correct require path
PHPBB3-10223
This commit is contained in:
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
Reference in New Issue
Block a user