mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/10223] Check optional before file_exists and correct require path
PHPBB3-10223
This commit is contained in:
parent
1b0821a11b
commit
d3f1b60292
2 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Reference in a new issue