-
phpBB is no longer supported on PHP4 due to several compatibility issues and we recommend that you upgrade to the latest stable release of PHP5 to run phpBB. The minimum version required is PHP 5.2.0.
+
phpBB is no longer supported on PHP4 due to several compatibility issues and we recommend that you upgrade to the latest stable release of PHP5 to run phpBB. The minimum version required is PHP 5.3.2.
Please remember that running any application on a developmental version of PHP can lead to strange/unexpected results which may appear to be bugs in the application (which may not be true). Therefore we recommend you upgrade to the newest stable version of PHP before running phpBB3. If you are running a developmental version of PHP please check any bugs you find on a system running a stable release before submitting.
-
This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MSSQL Server 2000, PostgreSQL 7.x, Oracle 8, SQLite and Firebird. Versions of PHP used range from 5.2.0 to 5.3.x without problem.
+
This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MSSQL Server 2000, PostgreSQL 7.x, Oracle 8, SQLite and Firebird. Versions of PHP used range from 5.3.2 to 5.4.x without problem.
7.i. Notice on PHP security issues
diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html
index e85be02d45..f8aaf77441 100644
--- a/phpBB/docs/coding-guidelines.html
+++ b/phpBB/docs/coding-guidelines.html
@@ -2348,7 +2348,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
...
-'FOO_BAR' => 'PHP version < 5.2.0.<br />
+'FOO_BAR' => 'PHP version < 5.3.2.<br />
Visit "Downloads" at <a href="http://www.php.net/">www.php.net</a>.',
...
@@ -2357,7 +2357,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
...
-'FOO_BAR' => 'PHP version < 5.2.0.<br />
+'FOO_BAR' => 'PHP version < 5.3.2.<br />
Visit "Downloads" at <a href="http://www.php.net/">www.php.net</a>.',
...
@@ -2366,7 +2366,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
...
-'FOO_BAR' => 'PHP version < 5.2.0.<br />
+'FOO_BAR' => 'PHP version < 5.3.2.<br />
Visit “Downloads” at <a href="http://www.php.net/">www.php.net</a>.',
...
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index b30c294ce2..88c29702d4 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -397,11 +397,11 @@ class acp_main
// Version check
$user->add_lang('install');
- if ($auth->acl_get('a_server') && version_compare(PHP_VERSION, '5.2.0', '<'))
+ if ($auth->acl_get('a_server') && version_compare(PHP_VERSION, '5.3.2', '<'))
{
$template->assign_vars(array(
'S_PHP_VERSION_OLD' => true,
- 'L_PHP_VERSION_OLD' => sprintf($user->lang['PHP_VERSION_OLD'], '
', ''),
+ 'L_PHP_VERSION_OLD' => sprintf($user->lang['PHP_VERSION_OLD'], '
', ''),
));
}
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 97f4b1b5fd..cf6716c322 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -128,7 +128,7 @@ class acp_users
$dropdown_modes = array();
while ($row = $db->sql_fetchrow($result))
{
- if (!$this->p_master->module_auth($row['module_auth']))
+ if (!$this->p_master->module_auth_self($row['module_auth']))
{
continue;
}
diff --git a/phpBB/includes/extension/controller_interface.php b/phpBB/includes/extension/controller_interface.php
new file mode 100644
index 0000000000..bcc8972db4
--- /dev/null
+++ b/phpBB/includes/extension/controller_interface.php
@@ -0,0 +1,31 @@
+phpbb_root_path . 'ext/'))
+ {
+ return $available;
+ }
$iterator = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($this->phpbb_root_path . 'ext/'),
@@ -428,6 +432,28 @@ class phpbb_extension_manager
}
return $disabled;
}
+
+ /**
+ * Check to see if a given extension is available on the filesystem
+ *
+ * @param string $name Extension name to check NOTE: Can be user input
+ * @return bool Depending on whether or not the extension is available
+ */
+ public function available($name)
+ {
+ return file_exists($this->get_extension_path($name, true));
+ }
+
+ /**
+ * Check to see if a given extension is enabled
+ *
+ * @param string $name Extension name to check
+ * @return bool Depending on whether or not the extension is enabled
+ */
+ public function enabled($name)
+ {
+ return isset($this->extensions[$name]) && $this->extensions[$name]['ext_active'];
+ }
/**
* Instantiates a phpbb_extension_finder.
diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php
index db7defdc48..ad76be9f2f 100644
--- a/phpBB/includes/functions_module.php
+++ b/phpBB/includes/functions_module.php
@@ -128,7 +128,7 @@ class p_master
foreach ($this->module_cache['modules'] as $key => $row)
{
// Not allowed to view module?
- if (!$this->module_auth($row['module_auth']))
+ if (!$this->module_auth_self($row['module_auth']))
{
unset($this->module_cache['modules'][$key]);
continue;
@@ -315,9 +315,23 @@ class p_master
}
/**
- * Check module authorisation
+ * Check module authorisation.
+ *
+ * This is a non-static version that uses $this->acl_forum_id
+ * for the forum id.
*/
- function module_auth($module_auth, $forum_id = false)
+ function module_auth_self($module_auth)
+ {
+ return self::module_auth($module_auth, $this->acl_forum_id);
+ }
+
+ /**
+ * Check module authorisation.
+ *
+ * This is a static version, it must be given $forum_id.
+ * See also module_auth_self.
+ */
+ static function module_auth($module_auth, $forum_id)
{
global $auth, $config;
global $request;
@@ -362,11 +376,9 @@ class p_master
$module_auth = implode(' ', $tokens);
- // Make sure $id seperation is working fine
+ // Make sure $id separation is working fine
$module_auth = str_replace(' , ', ',', $module_auth);
- $forum_id = ($forum_id === false) ? $this->acl_forum_id : $forum_id;
-
$is_auth = false;
eval('$is_auth = (int) (' . preg_replace(array('#acl_([a-z0-9_]+)(,\$id)?#', '#\$id#', '#aclf_([a-z0-9_]+)#', '#cfg_([a-z0-9_]+)#', '#request_([a-zA-Z0-9_]+)#'), array('(int) $auth->acl_get(\'\\1\'\\2)', '(int) $forum_id', '(int) $auth->acl_getf_global(\'\\1\')', '(int) $config[\'\\1\']', '$request->variable(\'\\1\', false)'), $module_auth) . ');');
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 4e4ce5bca7..b3816baedd 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1180,36 +1180,32 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
$topic_title = ($topic_notification) ? $topic_title : $subject;
$topic_title = censor_text($topic_title);
- // Get banned User ID's
- $sql = 'SELECT ban_userid
- FROM ' . BANLIST_TABLE . '
- WHERE ban_userid <> 0
- AND ban_exclude <> 1';
- $result = $db->sql_query($sql);
-
- $sql_ignore_users = ANONYMOUS . ', ' . $user->data['user_id'];
- while ($row = $db->sql_fetchrow($result))
+ // Exclude guests, current user and banned users from notifications
+ if (!function_exists('phpbb_get_banned_user_ids'))
{
- $sql_ignore_users .= ', ' . (int) $row['ban_userid'];
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
}
- $db->sql_freeresult($result);
+ $sql_ignore_users = phpbb_get_banned_user_ids();
+ $sql_ignore_users[ANONYMOUS] = ANONYMOUS;
+ $sql_ignore_users[$user->data['user_id']] = $user->data['user_id'];
$notify_rows = array();
// -- get forum_userids || topic_userids
$sql = 'SELECT u.user_id, u.username, u.user_email, u.user_lang, u.user_notify_type, u.user_jabber
FROM ' . (($topic_notification) ? TOPICS_WATCH_TABLE : FORUMS_WATCH_TABLE) . ' w, ' . USERS_TABLE . ' u
- WHERE w.' . (($topic_notification) ? 'topic_id' : 'forum_id') . ' = ' . (($topic_notification) ? $topic_id : $forum_id) . "
- AND w.user_id NOT IN ($sql_ignore_users)
- AND w.notify_status = " . NOTIFY_YES . '
+ WHERE w.' . (($topic_notification) ? 'topic_id' : 'forum_id') . ' = ' . (($topic_notification) ? $topic_id : $forum_id) . '
+ AND ' . $db->sql_in_set('w.user_id', $sql_ignore_users, true) . '
+ AND w.notify_status = ' . NOTIFY_YES . '
AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')
AND u.user_id = w.user_id';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
- $notify_rows[$row['user_id']] = array(
- 'user_id' => $row['user_id'],
+ $notify_user_id = (int) $row['user_id'];
+ $notify_rows[$notify_user_id] = array(
+ 'user_id' => $notify_user_id,
'username' => $row['username'],
'user_email' => $row['user_email'],
'user_jabber' => $row['user_jabber'],
@@ -1219,30 +1215,29 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
'method' => $row['user_notify_type'],
'allowed' => false
);
+
+ // Add users who have been already notified to ignore list
+ $sql_ignore_users[$notify_user_id] = $notify_user_id;
}
$db->sql_freeresult($result);
// forum notification is sent to those not already receiving topic notifications
if ($topic_notification)
{
- if (sizeof($notify_rows))
- {
- $sql_ignore_users .= ', ' . implode(', ', array_keys($notify_rows));
- }
-
$sql = 'SELECT u.user_id, u.username, u.user_email, u.user_lang, u.user_notify_type, u.user_jabber
FROM ' . FORUMS_WATCH_TABLE . ' fw, ' . USERS_TABLE . " u
WHERE fw.forum_id = $forum_id
- AND fw.user_id NOT IN ($sql_ignore_users)
- AND fw.notify_status = " . NOTIFY_YES . '
+ AND " . $db->sql_in_set('fw.user_id', $sql_ignore_users, true) . '
+ AND fw.notify_status = ' . NOTIFY_YES . '
AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')
AND u.user_id = fw.user_id';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
- $notify_rows[$row['user_id']] = array(
- 'user_id' => $row['user_id'],
+ $notify_user_id = (int) $row['user_id'];
+ $notify_rows[$notify_user_id] = array(
+ 'user_id' => $notify_user_id,
'username' => $row['username'],
'user_email' => $row['user_email'],
'user_jabber' => $row['user_jabber'],
@@ -1273,7 +1268,6 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
}
}
-
// Now, we have to do a little step before really sending, we need to distinguish our users a little bit. ;)
$msg_users = $delete_ids = $update_notification = array();
foreach ($notify_rows as $user_id => $row)
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index 91e453b8e0..a6fb87536a 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -1666,6 +1666,7 @@ function pm_notification($mode, $author, $recipients, $subject, $message, $msg_i
$subject = censor_text($subject);
+ // Exclude guests, current user and banned users from notifications
unset($recipients[ANONYMOUS], $recipients[$user->data['user_id']]);
if (!sizeof($recipients))
@@ -1673,18 +1674,12 @@ function pm_notification($mode, $author, $recipients, $subject, $message, $msg_i
return;
}
- // Get banned User ID's
- $sql = 'SELECT ban_userid
- FROM ' . BANLIST_TABLE . '
- WHERE ' . $db->sql_in_set('ban_userid', array_map('intval', array_keys($recipients))) . '
- AND ban_exclude = 0';
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
+ if (!function_exists('phpbb_get_banned_user_ids'))
{
- unset($recipients[$row['ban_userid']]);
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
}
- $db->sql_freeresult($result);
+ $banned_users = phpbb_get_banned_user_ids(array_keys($recipients));
+ $recipients = array_diff(array_keys($recipients), $banned_users);
if (!sizeof($recipients))
{
@@ -1693,7 +1688,7 @@ function pm_notification($mode, $author, $recipients, $subject, $message, $msg_i
$sql = 'SELECT user_id, username, user_email, user_lang, user_notify_pm, user_notify_type, user_jabber
FROM ' . USERS_TABLE . '
- WHERE ' . $db->sql_in_set('user_id', array_map('intval', array_keys($recipients)));
+ WHERE ' . $db->sql_in_set('user_id', $recipients);
$result = $db->sql_query($sql);
$msg_list_ary = array();
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 509e1a953c..18452c27e9 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -3691,3 +3691,36 @@ function remove_newly_registered($user_id, $user_data = false)
return $user_data['group_id'];
}
+
+/**
+* Gets user ids of currently banned registered users.
+*
+* @param array $user_ids Array of users' ids to check for banning,
+* leave empty to get complete list of banned ids
+* @return array Array of banned users' ids if any, empty array otherwise
+*/
+function phpbb_get_banned_user_ids($user_ids = array())
+{
+ global $db;
+
+ $sql_user_ids = (!empty($user_ids)) ? $db->sql_in_set('ban_userid', $user_ids) : 'ban_userid <> 0';
+
+ // Get banned User ID's
+ // Ignore stale bans which were not wiped yet
+ $banned_ids_list = array();
+ $sql = 'SELECT ban_userid
+ FROM ' . BANLIST_TABLE . "
+ WHERE $sql_user_ids
+ AND ban_exclude <> 1
+ AND (ban_end > " . time() . '
+ OR ban_end = 0)';
+ $result = $db->sql_query($sql);
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $user_id = (int) $row['ban_userid'];
+ $banned_ids_list[$user_id] = $user_id;
+ }
+ $db->sql_freeresult($result);
+
+ return $banned_ids_list;
+}
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
index 95e84e816b..69c6a4cfff 100644
--- a/phpBB/includes/mcp/mcp_reports.php
+++ b/phpBB/includes/mcp/mcp_reports.php
@@ -71,7 +71,7 @@ class mcp_reports
// closed reports are accessed by report id
$report_id = request_var('r', 0);
- $sql = 'SELECT r.post_id, r.user_id, r.report_id, r.report_closed, report_time, r.report_text, rr.reason_title, rr.reason_description, u.username, u.username_clean, u.user_colour
+ $sql = 'SELECT r.post_id, r.user_id, r.report_id, r.report_closed, report_time, r.report_text, r.reported_post_text, rr.reason_title, rr.reason_description, u.username, u.username_clean, u.user_colour
FROM ' . REPORTS_TABLE . ' r, ' . REPORTS_REASONS_TABLE . ' rr, ' . USERS_TABLE . ' u
WHERE ' . (($report_id) ? 'r.report_id = ' . $report_id : "r.post_id = $post_id") . '
AND rr.reason_id = r.reason_id
@@ -116,8 +116,9 @@ class mcp_reports
$template->assign_vars(array(
'S_TOPIC_REVIEW' => true,
'S_BBCODE_ALLOWED' => $post_info['enable_bbcode'],
- 'TOPIC_TITLE' => $post_info['topic_title'])
- );
+ 'TOPIC_TITLE' => $post_info['topic_title'],
+ 'REPORTED_POST_ID' => $post_id,
+ ));
}
$topic_tracking_info = $extensions = $attachments = array();
@@ -226,7 +227,7 @@ class mcp_reports
'REPORTER_NAME' => get_username_string('username', $report['user_id'], $report['username'], $report['user_colour']),
'U_VIEW_REPORTER_PROFILE' => get_username_string('profile', $report['user_id'], $report['username'], $report['user_colour']),
- 'POST_PREVIEW' => $message,
+ 'POST_PREVIEW' => bbcode_nl2br($report['reported_post_text']),
'POST_SUBJECT' => ($post_info['post_subject']) ? $post_info['post_subject'] : $user->lang['NO_SUBJECT'],
'POST_DATE' => $user->format_date($post_info['post_time']),
'POST_IP' => $post_info['poster_ip'],
diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php
index 598b470663..d4ba89b04c 100644
--- a/phpBB/includes/mcp/mcp_topic.php
+++ b/phpBB/includes/mcp/mcp_topic.php
@@ -49,6 +49,16 @@ function mcp_topic_view($id, $mode, $action)
$submitted_id_list = request_var('post_ids', array(0));
$checked_ids = $post_id_list = request_var('post_id_list', array(0));
+ // Resync Topic?
+ if ($action == 'resync')
+ {
+ if (!function_exists('mcp_resync_topics'))
+ {
+ include($phpbb_root_path . 'includes/mcp/mcp_forum.' . $phpEx);
+ }
+ mcp_resync_topics(array($topic_id));
+ }
+
// Split Topic?
if ($action == 'split_all' || $action == 'split_beyond')
{
@@ -319,6 +329,7 @@ function mcp_topic_view($id, $mode, $action)
'S_CAN_APPROVE' => ($has_unapproved_posts && $auth->acl_get('m_approve', $topic_info['forum_id'])) ? true : false,
'S_CAN_LOCK' => ($auth->acl_get('m_lock', $topic_info['forum_id'])) ? true : false,
'S_CAN_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? true : false,
+ 'S_CAN_SYNC' => $auth->acl_get('m_', $topic_info['forum_id']),
'S_REPORT_VIEW' => ($action == 'reports') ? true : false,
'S_MERGE_VIEW' => ($action == 'merge') ? true : false,
'S_SPLIT_VIEW' => ($action == 'split') ? true : false,
diff --git a/phpBB/includes/startup.php b/phpBB/includes/startup.php
index 2100fbd97e..fc45cd882b 100644
--- a/phpBB/includes/startup.php
+++ b/phpBB/includes/startup.php
@@ -19,7 +19,8 @@ if (!defined('E_DEPRECATED'))
{
define('E_DEPRECATED', 8192);
}
-error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
+$level = E_ALL & ~E_NOTICE & ~E_DEPRECATED;
+error_reporting($level);
/*
* Remove variables created by register_globals from the global scope
diff --git a/phpBB/index.php b/phpBB/index.php
index f1243bb336..d71878a885 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -24,6 +24,39 @@ $user->session_begin();
$auth->acl($user->data);
$user->setup('viewforum');
+// Handle the display of extension front pages
+if ($ext = $request->variable('ext', ''))
+{
+ $class = 'phpbb_ext_' . str_replace('/', '_', $ext) . '_controller';
+
+ if (!$phpbb_extension_manager->available($ext))
+ {
+ send_status_line(404, 'Not Found');
+ trigger_error($user->lang('EXTENSION_DOES_NOT_EXIST', $ext));
+ }
+ else if (!$phpbb_extension_manager->enabled($ext))
+ {
+ send_status_line(404, 'Not Found');
+ trigger_error($user->lang('EXTENSION_DISABLED', $ext));
+ }
+ else if (!class_exists($class))
+ {
+ send_status_line(404, 'Not Found');
+ trigger_error($user->lang('EXTENSION_CONTROLLER_MISSING', $ext));
+ }
+
+ $controller = new $class;
+
+ if (!($controller instanceof phpbb_extension_controller_interface))
+ {
+ send_status_line(500, 'Internal Server Error');
+ trigger_error($user->lang('EXTENSION_CLASS_WRONG_TYPE', $class));
+ }
+
+ $controller->handle();
+ exit_handler();
+}
+
display_forums('', $config['load_moderators']);
$order_legend = ($config['legend_sort_groupname']) ? 'group_name' : 'group_legend';
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 995f4c9a95..3e56112713 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -1094,6 +1094,9 @@ function database_update_info()
'style_parent_id' => array('UINT:4', 0),
'style_parent_tree' => array('TEXT', ''),
),
+ REPORTS_TABLE => array(
+ 'reported_post_text' => array('MTEXT_UNI', ''),
+ ),
),
'change_columns' => array(
GROUPS_TABLE => array(
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index 1f013df72b..f3664c177c 100644
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -17,9 +17,9 @@ define('IN_INSTALL', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
-if (version_compare(PHP_VERSION, '5.2.0') < 0)
+if (version_compare(PHP_VERSION, '5.3.2') < 0)
{
- die('You are running an unsupported PHP version. Please upgrade to PHP 5.2.0 or higher before trying to install phpBB 3.1');
+ die('You are running an unsupported PHP version. Please upgrade to PHP 5.3.2 or higher before trying to install phpBB 3.1');
}
function phpbb_require_updated($path, $optional = false)
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 4663b5204e..361376763d 100644
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -140,7 +140,7 @@ class install_install extends module
// Test the minimum PHP version
$php_version = PHP_VERSION;
- if (version_compare($php_version, '5.2.0') < 0)
+ if (version_compare($php_version, '5.3.2') < 0)
{
$result = '
' . $lang['NO'] . '';
}
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql
index adea0b4cc2..51565ef2d4 100644
--- a/phpBB/install/schemas/firebird_schema.sql
+++ b/phpBB/install/schemas/firebird_schema.sql
@@ -909,7 +909,8 @@ CREATE TABLE phpbb_reports (
user_notify INTEGER DEFAULT 0 NOT NULL,
report_closed INTEGER DEFAULT 0 NOT NULL,
report_time INTEGER DEFAULT 0 NOT NULL,
- report_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
+ report_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ reported_post_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
);;
ALTER TABLE phpbb_reports ADD PRIMARY KEY (report_id);;
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
index 292a85b816..2c78dd009f 100644
--- a/phpBB/install/schemas/mssql_schema.sql
+++ b/phpBB/install/schemas/mssql_schema.sql
@@ -1108,7 +1108,8 @@ CREATE TABLE [phpbb_reports] (
[user_notify] [int] DEFAULT (0) NOT NULL ,
[report_closed] [int] DEFAULT (0) NOT NULL ,
[report_time] [int] DEFAULT (0) NOT NULL ,
- [report_text] [text] DEFAULT ('') NOT NULL
+ [report_text] [text] DEFAULT ('') NOT NULL ,
+ [reported_post_text] [text] DEFAULT ('') NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql
index 13d0199b8a..d19f1930d0 100644
--- a/phpBB/install/schemas/mysql_40_schema.sql
+++ b/phpBB/install/schemas/mysql_40_schema.sql
@@ -647,6 +647,7 @@ CREATE TABLE phpbb_reports (
report_closed tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
report_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
report_text mediumblob NOT NULL,
+ reported_post_text mediumblob NOT NULL,
PRIMARY KEY (report_id),
KEY post_id (post_id),
KEY pm_id (pm_id)
diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql
index c26cb89f37..3fd8d4f1d1 100644
--- a/phpBB/install/schemas/mysql_41_schema.sql
+++ b/phpBB/install/schemas/mysql_41_schema.sql
@@ -647,6 +647,7 @@ CREATE TABLE phpbb_reports (
report_closed tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
report_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
report_text mediumtext NOT NULL,
+ reported_post_text mediumtext NOT NULL,
PRIMARY KEY (report_id),
KEY post_id (post_id),
KEY pm_id (pm_id)
diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql
index 23bdebdb8a..8a0f3e56b1 100644
--- a/phpBB/install/schemas/oracle_schema.sql
+++ b/phpBB/install/schemas/oracle_schema.sql
@@ -1214,6 +1214,7 @@ CREATE TABLE phpbb_reports (
report_closed number(1) DEFAULT '0' NOT NULL,
report_time number(11) DEFAULT '0' NOT NULL,
report_text clob DEFAULT '' ,
+ reported_post_text clob DEFAULT '' ,
CONSTRAINT pk_phpbb_reports PRIMARY KEY (report_id)
)
/
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index d18cb08539..c624024362 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -853,6 +853,7 @@ CREATE TABLE phpbb_reports (
report_closed INT2 DEFAULT '0' NOT NULL CHECK (report_closed >= 0),
report_time INT4 DEFAULT '0' NOT NULL CHECK (report_time >= 0),
report_text TEXT DEFAULT '' NOT NULL,
+ reported_post_text TEXT DEFAULT '' NOT NULL,
PRIMARY KEY (report_id)
);
diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql
index c5f417961d..bd002c93ed 100644
--- a/phpBB/install/schemas/sqlite_schema.sql
+++ b/phpBB/install/schemas/sqlite_schema.sql
@@ -627,7 +627,8 @@ CREATE TABLE phpbb_reports (
user_notify INTEGER UNSIGNED NOT NULL DEFAULT '0',
report_closed INTEGER UNSIGNED NOT NULL DEFAULT '0',
report_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
- report_text mediumtext(16777215) NOT NULL DEFAULT ''
+ report_text mediumtext(16777215) NOT NULL DEFAULT '',
+ reported_post_text mediumtext(16777215) NOT NULL DEFAULT ''
);
CREATE INDEX phpbb_reports_post_id ON phpbb_reports (post_id);
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index 7741ff8d1f..94edddc6f5 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -185,7 +185,11 @@ $lang = array_merge($lang, array(
'ERR_WRONG_PATH_TO_PHPBB' => 'The phpBB path specified appears to be invalid.',
'EXPAND_VIEW' => 'Expand view',
'EXTENSION' => 'Extension',
+ 'EXTENSION_CONTROLLER_MISSING' => 'The extension
%s is missing a controller class and cannot be accessed through the front-end.',
+ 'EXTENSION_CLASS_WRONG_TYPE' => 'The extension controller class
%s is not an instance of the phpbb_extension_controller_interface.',
+ 'EXTENSION_DISABLED' => 'The extension
%s is not enabled.',
'EXTENSION_DISABLED_AFTER_POSTING' => 'The extension
%s has been deactivated and can no longer be displayed.',
+ 'EXTENSION_DOES_NOT_EXIST' => 'The extension
%s does not exist.',
'FAQ' => 'FAQ',
'FAQ_EXPLAIN' => 'Frequently Asked Questions',
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index 254db4a5c1..ca6045a921 100644
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -300,10 +300,10 @@ $lang = array_merge($lang, array(
'PHP_REGISTER_GLOBALS_EXPLAIN' => 'phpBB will still run if this setting is enabled, but if possible, it is recommended that register_globals is disabled on your PHP install for security reasons.',
'PHP_SAFE_MODE' => 'Safe mode',
'PHP_SETTINGS' => 'PHP version and settings',
- 'PHP_SETTINGS_EXPLAIN' => '
Required - You must be running at least version 5.2.0 of PHP in order to install phpBB. If
safe mode is displayed below your PHP installation is running in that mode. This will impose limitations on remote administration and similar features.',
+ 'PHP_SETTINGS_EXPLAIN' => '
Required - You must be running at least version 5.3.2 of PHP in order to install phpBB. If
safe mode is displayed below your PHP installation is running in that mode. This will impose limitations on remote administration and similar features.',
'PHP_URL_FOPEN_SUPPORT' => 'PHP setting
allow_url_fopen is enabled',
'PHP_URL_FOPEN_SUPPORT_EXPLAIN' => '
Optional - This setting is optional, however certain phpBB functions like off-site avatars will not work properly without it.',
- 'PHP_VERSION_REQD' => 'PHP version >= 5.2.0',
+ 'PHP_VERSION_REQD' => 'PHP version >= 5.3.2',
'POST_ID' => 'Post ID',
'PREFIX_FOUND' => 'A scan of your tables has shown a valid installation using
%s as table prefix.',
'PREPROCESS_STEP' => 'Executing pre-processing functions/queries',
diff --git a/phpBB/language/en/mcp.php b/phpBB/language/en/mcp.php
index 664365b1ec..bd25d403ab 100644
--- a/phpBB/language/en/mcp.php
+++ b/phpBB/language/en/mcp.php
@@ -238,6 +238,7 @@ $lang = array_merge($lang, array(
'NO_POST' => 'You have to select a post in order to warn the user for a post.',
'NO_POST_REPORT' => 'This post was not reported.',
'NO_POST_SELECTED' => 'You must select at least one post to perform this action.',
+ 'NO_POSTS_QUEUE' => 'There are no posts waiting for approval.',
'NO_REASON_DISAPPROVAL' => 'Please give an appropriate reason for disapproval.',
'NO_REPORT' => 'No report found',
'NO_REPORTS' => 'No reports found',
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index cf2cb5b06d..741ac2f430 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -1347,6 +1347,7 @@ switch ($mode)
if ($mode)
{
$params[] = "mode=$mode";
+ $u_first_char_params[] = "mode=$mode";
}
$sort_params[] = "mode=$mode";
diff --git a/phpBB/report.php b/phpBB/report.php
index e29001d389..29b46a6211 100644
--- a/phpBB/report.php
+++ b/phpBB/report.php
@@ -71,8 +71,9 @@ if ($post_id)
trigger_error('POST_NOT_EXIST');
}
- $forum_id = (int) $report_data['forum_id'];
- $topic_id = (int) $report_data['topic_id'];
+ $forum_id = (int) $report_data['forum_id'];
+ $topic_id = (int) $report_data['topic_id'];
+ $reported_post_text = $report_data['post_text'];
$sql = 'SELECT *
FROM ' . FORUMS_TABLE . '
@@ -130,6 +131,8 @@ else
$message .= '
' . sprintf($user->lang['RETURN_PM'], '
', '');
trigger_error($message);
}
+
+ $reported_post_text = $report_data['message_text'];
}
// Submit report?
@@ -155,7 +158,8 @@ if ($submit && $reason_id)
'user_notify' => (int) $user_notify,
'report_closed' => 0,
'report_time' => (int) time(),
- 'report_text' => (string) $report_text
+ 'report_text' => (string) $report_text,
+ 'reported_post_text' => $reported_post_text,
);
$sql = 'INSERT INTO ' . REPORTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
diff --git a/phpBB/styles/prosilver/template/mcp_queue.html b/phpBB/styles/prosilver/template/mcp_queue.html
index 5f16ebe7d0..f86678ebe4 100644
--- a/phpBB/styles/prosilver/template/mcp_queue.html
+++ b/phpBB/styles/prosilver/template/mcp_queue.html
@@ -78,7 +78,7 @@
-
{L_NO_TOPICS_QUEUE}{L_UNAPPROVED_POSTS_ZERO_TOTAL}
+
{L_NO_TOPICS_QUEUE}{L_NO_POSTS_QUEUE}
diff --git a/phpBB/styles/prosilver/template/mcp_topic.html b/phpBB/styles/prosilver/template/mcp_topic.html
index 6943dd41b3..ab0c83a56f 100644
--- a/phpBB/styles/prosilver/template/mcp_topic.html
+++ b/phpBB/styles/prosilver/template/mcp_topic.html
@@ -106,7 +106,7 @@ onload_functions.push('subPanels()');