aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/install/database_update.php24
-rw-r--r--phpBB/install/index.php24
-rw-r--r--phpBB/language/en/acp/styles.php8
-rw-r--r--phpBB/viewforum.php2
4 files changed, 43 insertions, 15 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index e9213cac9d..337f08b626 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -34,7 +34,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;
@@ -72,10 +89,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);
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index ff6a297022..5189cbfc8e 100644
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -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);
@@ -57,10 +74,7 @@ else
// Include essential scripts
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);
diff --git a/phpBB/language/en/acp/styles.php b/phpBB/language/en/acp/styles.php
index 8f65b3ef5f..3c8c4a328f 100644
--- a/phpBB/language/en/acp/styles.php
+++ b/phpBB/language/en/acp/styles.php
@@ -285,9 +285,9 @@ $lang = array_merge($lang, array(
'INSTALLED_TEMPLATE' => 'Installed templates',
'INSTALLED_THEME' => 'Installed themes',
- 'KEEP_IMAGESET' => 'Keep "%s" imageset',
- 'KEEP_TEMPLATE' => 'Keep "%s" template',
- 'KEEP_THEME' => 'Keep "%s" theme',
+ 'KEEP_IMAGESET' => 'Keep “%s” imageset',
+ 'KEEP_TEMPLATE' => 'Keep “%s” template',
+ 'KEEP_THEME' => 'Keep “%s” theme',
'LINE_SPACING' => 'Line spacing',
'LOCALISED_IMAGES' => 'Localised',
@@ -325,7 +325,7 @@ $lang = array_merge($lang, array(
'REPLACE_TEMPLATE_EXPLAIN' => 'This template set will replace the one you are deleting in any styles that use it.',
'REPLACE_THEME' => 'Replace theme with',
'REPLACE_THEME_EXPLAIN' => 'This theme will replace the one you are deleting in any styles that use it.',
- 'REPLACE_WITH_OPTION' => 'Replace with "%s"',
+ 'REPLACE_WITH_OPTION' => 'Replace with “%s”',
'REQUIRES_IMAGESET' => 'This style requires the %s imageset to be installed.',
'REQUIRES_TEMPLATE' => 'This style requires the %s template set to be installed.',
'REQUIRES_THEME' => 'This style requires the %s theme to be installed.',
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index cce25d115c..61ec27ed79 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -267,7 +267,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;