mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-30 11:11:23 +02:00
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/10223] The search fid parameter is an array of forums not just an id [ticket/10223] Check optional before file_exists and correct require path [ticket/10223] requiring the new startup.php file conditionally.
This commit is contained in:
commit
93dba4b023
@ -33,7 +33,24 @@ define('IN_INSTALL', true);
|
||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
|
||||
require($phpbb_root_path . 'includes/startup.' . $phpEx);
|
||||
function phpbb_require_updated($path, $optional = false)
|
||||
{
|
||||
global $phpbb_root_path;
|
||||
|
||||
$new_path = $phpbb_root_path . 'install/update/new/' . $path;
|
||||
$old_path = $phpbb_root_path . $path;
|
||||
|
||||
if (file_exists($new_path))
|
||||
{
|
||||
require($new_path);
|
||||
}
|
||||
else if (!$optional || file_exists($old_path))
|
||||
{
|
||||
require($old_path);
|
||||
}
|
||||
}
|
||||
|
||||
phpbb_require_updated('includes/startup.' . $phpEx);
|
||||
|
||||
$updates_to_version = UPDATES_TO_VERSION;
|
||||
$debug_from_version = DEBUG_FROM_VERSION;
|
||||
@ -70,10 +87,7 @@ require($phpbb_root_path . 'includes/auth.' . $phpEx);
|
||||
|
||||
require($phpbb_root_path . 'includes/functions.' . $phpEx);
|
||||
|
||||
if (file_exists($phpbb_root_path . 'includes/functions_content.' . $phpEx))
|
||||
{
|
||||
require($phpbb_root_path . 'includes/functions_content.' . $phpEx);
|
||||
}
|
||||
phpbb_require_updated('includes/functions_content.' . $phpEx, true);
|
||||
|
||||
require($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/constants.' . $phpEx);
|
||||
|
@ -24,7 +24,24 @@ if (version_compare(PHP_VERSION, '4.3.3') < 0)
|
||||
die('You are running an unsupported PHP version. Please upgrade to PHP 4.3.3 or higher before trying to install phpBB 3.0');
|
||||
}
|
||||
|
||||
require($phpbb_root_path . 'includes/startup.' . $phpEx);
|
||||
function phpbb_require_updated($path, $optional = false)
|
||||
{
|
||||
global $phpbb_root_path;
|
||||
|
||||
$new_path = $phpbb_root_path . 'install/update/new/' . $path;
|
||||
$old_path = $phpbb_root_path . $path;
|
||||
|
||||
if (file_exists($new_path))
|
||||
{
|
||||
require($new_path);
|
||||
}
|
||||
else if (!$optional || file_exists($old_path))
|
||||
{
|
||||
require($old_path);
|
||||
}
|
||||
}
|
||||
|
||||
phpbb_require_updated('includes/startup.' . $phpEx);
|
||||
|
||||
// Try to override some limits - maybe it helps some...
|
||||
@set_time_limit(0);
|
||||
@ -58,10 +75,7 @@ else
|
||||
require($phpbb_root_path . 'includes/class_loader.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/functions.' . $phpEx);
|
||||
|
||||
if (file_exists($phpbb_root_path . 'includes/functions_content.' . $phpEx))
|
||||
{
|
||||
require($phpbb_root_path . 'includes/functions_content.' . $phpEx);
|
||||
}
|
||||
phpbb_require_updated('includes/functions_content.' . $phpEx, true);
|
||||
|
||||
include($phpbb_root_path . 'includes/auth.' . $phpEx);
|
||||
include($phpbb_root_path . 'includes/session.' . $phpEx);
|
||||
|
@ -272,7 +272,7 @@ $post_alt = ($forum_data['forum_status'] == ITEM_LOCKED) ? $user->lang['FORUM_LO
|
||||
// Display active topics?
|
||||
$s_display_active = ($forum_data['forum_type'] == FORUM_CAT && ($forum_data['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS)) ? true : false;
|
||||
|
||||
$s_search_hidden_fields = array('fid' => $forum_id);
|
||||
$s_search_hidden_fields = array('fid' => array($forum_id));
|
||||
if ($_SID)
|
||||
{
|
||||
$s_search_hidden_fields['sid'] = $_SID;
|
||||
|
Loading…
x
Reference in New Issue
Block a user