aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/adm/style/acp_ext_actions.html7
-rw-r--r--phpBB/common.php2
-rw-r--r--phpBB/develop/add_permissions.php1
-rw-r--r--phpBB/docs/README.html6
-rw-r--r--phpBB/includes/acp/acp_extensions.php39
-rw-r--r--phpBB/includes/acp/acp_permissions.php4
-rw-r--r--phpBB/includes/acp/auth.php21
-rw-r--r--phpBB/includes/diff/engine.php6
-rw-r--r--phpBB/includes/functions_convert.php3
-rw-r--r--phpBB/includes/mcp/mcp_logs.php2
-rw-r--r--phpBB/includes/mcp/mcp_notes.php2
-rw-r--r--phpBB/includes/mcp/mcp_warn.php2
-rw-r--r--phpBB/includes/startup.php6
-rw-r--r--phpBB/includes/ucp/ucp_groups.php16
-rw-r--r--phpBB/install/app.php4
-rw-r--r--phpBB/install/schemas/schema_data.sql3
-rw-r--r--phpBB/language/en/acp/permissions_phpbb.php1
-rw-r--r--phpBB/language/en/install.php2
-rw-r--r--phpBB/mcp.php2
-rw-r--r--phpBB/memberlist.php7
-rw-r--r--phpBB/phpbb/db/migration/data/v32x/user_emoji_permission.php44
-rw-r--r--phpBB/phpbb/feed/controller/feed.php7
-rw-r--r--phpBB/phpbb/install/module/requirements/task/check_server_environment.php4
-rw-r--r--phpBB/phpbb/permissions.php1
-rw-r--r--phpBB/phpbb/request/type_cast_helper.php3
-rw-r--r--phpBB/posting.php27
-rw-r--r--phpBB/search.php9
-rw-r--r--phpBB/styles/prosilver/template/posting_attach_body.html4
28 files changed, 151 insertions, 84 deletions
diff --git a/phpBB/adm/style/acp_ext_actions.html b/phpBB/adm/style/acp_ext_actions.html
index 6f2341f381..6b59ab7180 100644
--- a/phpBB/adm/style/acp_ext_actions.html
+++ b/phpBB/adm/style/acp_ext_actions.html
@@ -1,6 +1,7 @@
{% for action in enabled.actions %}
-<a href="{{ action.U_ACTION }}"{% if action.L_ACTION_EXPLAIN %} title="{{ action.L_ACTION_EXPLAIN }}"{% endif %}{% if action.COLOR %} style="color: {{ action.COLOR }};"{% endif %} data-ajax="{{ action.ACTION_AJAX }}" data-refresh="true">{{ action.L_ACTION }}</a>{% if not action.S_LAST_ROW %}&nbsp;|&nbsp;{% endif %}
+ <a href="{{ action.U_ACTION }}"{% if action.L_ACTION_EXPLAIN %} title="{{ action.L_ACTION_EXPLAIN }}"{% endif %}{% if action.COLOR %} style="color: {{ action.COLOR }};"{% endif %} data-ajax="{{ action.ACTION_AJAX }}" data-refresh="true">{{ action.L_ACTION }}</a>{% if not action.S_LAST_ROW %}&nbsp;|&nbsp;{% endif %}
{% endfor %}
+
{% for action in disabled.actions %}
-<a href="{{ action.U_ACTION }}"{% if action.L_ACTION_EXPLAIN %} title="{{ action.L_ACTION_EXPLAIN }}"{% endif %}{% if action.COLOR %} style="color: {{ action.COLOR }};"{% endif %} data-ajax="{{ action.ACTION_AJAX }}" data-refresh="true">{{ action.L_ACTION }}</a>{% if not action.S_LAST_ROW %}&nbsp;|&nbsp;{% endif %}
-{% endfor %} \ No newline at end of file
+ <a href="{{ action.U_ACTION }}"{% if action.L_ACTION_EXPLAIN %} title="{{ action.L_ACTION_EXPLAIN }}"{% endif %}{% if action.COLOR %} style="color: {{ action.COLOR }};"{% endif %} data-ajax="{{ action.ACTION_AJAX }}" data-refresh="true">{{ action.L_ACTION }}</a>{% if not action.S_LAST_ROW %}&nbsp;|&nbsp;{% endif %}
+{% endfor %}
diff --git a/phpBB/common.php b/phpBB/common.php
index fc009dd8c4..e25274d3f4 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -12,7 +12,7 @@
*/
/**
-* Minimum Requirement: PHP 7.1.0
+* Minimum Requirement: PHP 7.1.3
*/
if (!defined('IN_PHPBB'))
diff --git a/phpBB/develop/add_permissions.php b/phpBB/develop/add_permissions.php
index d2c8bffd90..cb6afb94ed 100644
--- a/phpBB/develop/add_permissions.php
+++ b/phpBB/develop/add_permissions.php
@@ -156,6 +156,7 @@ $u_permissions = array(
'u_download' => array(0, 1),
'u_attach' => array(0, 1),
'u_sig' => array(0, 1),
+ 'u_emoji' => array(0, 1),
'u_pm_attach' => array(0, 1),
'u_pm_bbcode' => array(0, 1),
'u_pm_smilies' => array(0, 1),
diff --git a/phpBB/docs/README.html b/phpBB/docs/README.html
index ca50fe95be..32b2d98ab4 100644
--- a/phpBB/docs/README.html
+++ b/phpBB/docs/README.html
@@ -265,7 +265,7 @@
<ul>
<li>Your server type/version, e.g. Apache 2.2.3, IIS 7, Sambar, etc.</li>
- <li>PHP version and mode of operation, e.g. PHP 7.1.0 as a module, PHP 7.1.0 running as CGI, etc.</li>
+ <li>PHP version and mode of operation, e.g. PHP 7.1.3 as a module, PHP 7.1.3 running as CGI, etc.</li>
<li>DB type/version, e.g. MySQL 5.0.77, PostgreSQL 9.0.6, MSSQL Server 2000 (via ODBC), etc.</li>
</ul>
@@ -323,11 +323,11 @@
<div class="content">
- <p>phpBB 3.3.x takes advantage of new features added in PHP 7.1.0. We recommend that you upgrade to the latest stable release of PHP to run phpBB. The minimum version required is PHP 7.1.0 and the maximum supported version is the latest stable version of PHP.</p>
+ <p>phpBB 3.3.x takes advantage of new features added in PHP 7.1. We recommend that you upgrade to the latest stable release of PHP to run phpBB. The minimum version required is PHP 7.1.3 and the maximum supported version is the latest stable version of PHP.</p>
<p>Please remember that running any application on a development (unstable, e.g. a beta release) version of PHP can lead to strange/unexpected results which may appear to be bugs in the application. Therefore, we recommend you upgrade to the newest stable version of PHP before running phpBB. If you are running a development version of PHP please check any bugs you find on a system running a stable release before submitting.</p>
- <p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQLi 4.1.3, 4.x, 5.x, MariaDB 5.x, PostgreSQL 8.x, Oracle 8 and SQLite 3. Versions of PHP used range from 7.1.0 to 7.2.x and 7.3.x without issues.</p>
+ <p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQLi 4.1.3, 4.x, 5.x, MariaDB 5.x, PostgreSQL 8.x, Oracle 8 and SQLite 3. Versions of PHP used range from 7.1.3 to 7.2.x and 7.3.x without issues.</p>
<a name="phpsec"></a><h3>7.i. Notice on PHP security issues</h3>
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index 6ac70ce3a8..86966541be 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -243,12 +243,19 @@ class acp_extensions
'DISABLE' => $this->u_action . '&amp;action=disable_pre&amp;ext_name=' . urlencode($ext_name),
]);
- $json_response = new \phpbb\json_response;
- $json_response->send(array(
+ $data = [
'EXT_ENABLE_SUCCESS' => true,
'ACTIONS' => $actions,
- ));
+ 'REFRESH_DATA' => [
+ 'url' => '',
+ 'time' => 0,
+ ],
+ ];
+
+ $json_response = new \phpbb\json_response;
+ $json_response->send($data);
}
+
trigger_error($this->user->lang('EXTENSION_ENABLE_SUCCESS') . adm_back_link($this->u_action), E_USER_NOTICE);
break;
@@ -299,12 +306,19 @@ class acp_extensions
'DELETE_DATA' => $this->u_action . '&amp;action=delete_data_pre&amp;ext_name=' . urlencode($ext_name),
]);
- $json_response = new \phpbb\json_response;
- $json_response->send(array(
+ $data = [
'EXT_DISABLE_SUCCESS' => true,
'ACTIONS' => $actions,
- ));
+ 'REFRESH_DATA' => [
+ 'url' => '',
+ 'time' => 0,
+ ],
+ ];
+
+ $json_response = new \phpbb\json_response;
+ $json_response->send($data);
}
+
trigger_error($this->user->lang('EXTENSION_DISABLE_SUCCESS') . adm_back_link($this->u_action), E_USER_NOTICE);
break;
@@ -361,12 +375,19 @@ class acp_extensions
'ENABLE' => $this->u_action . '&amp;action=enable_pre&amp;ext_name=' . urlencode($ext_name),
]);
- $json_response = new \phpbb\json_response;
- $json_response->send(array(
+ $data = [
'EXT_DELETE_DATA_SUCCESS' => true,
'ACTIONS' => $actions,
- ));
+ 'REFRESH_DATA' => [
+ 'url' => '',
+ 'time' => 0,
+ ],
+ ];
+
+ $json_response = new \phpbb\json_response;
+ $json_response->send($data);
}
+
trigger_error($this->user->lang('EXTENSION_DELETE_DATA_SUCCESS') . adm_back_link($this->u_action), E_USER_NOTICE);
break;
diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php
index e683b1972e..59bf366c1b 100644
--- a/phpBB/includes/acp/acp_permissions.php
+++ b/phpBB/includes/acp/acp_permissions.php
@@ -694,8 +694,8 @@ class acp_permissions
}
// We loop through the auth settings defined in our submit
- list($ug_id, ) = each($psubmit);
- list($forum_id, ) = each($psubmit[$ug_id]);
+ $ug_id = key($psubmit);
+ $forum_id = key($psubmit[$ug_id]);
$settings = $request->variable('setting', array(0 => array(0 => array('' => 0))), false, \phpbb\request\request_interface::POST);
if (empty($settings) || empty($settings[$ug_id]) || empty($settings[$ug_id][$forum_id]))
diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php
index b414a3121a..f203f9d3ba 100644
--- a/phpBB/includes/acp/auth.php
+++ b/phpBB/includes/acp/auth.php
@@ -460,8 +460,7 @@ class auth_admin extends \phpbb\auth\auth
'S_GROUP_MODE' => ($user_mode == 'group') ? true : false)
);
- @reset($content_array);
- while (list($ug_id, $ug_array) = each($content_array))
+ foreach ($content_array as $ug_id => $ug_array)
{
// Build role dropdown options
$current_role_id = (isset($cur_roles[$ug_id][$forum_id])) ? $cur_roles[$ug_id][$forum_id] : 0;
@@ -471,8 +470,7 @@ class auth_admin extends \phpbb\auth\auth
$s_role_options = '';
$current_role_id = (isset($cur_roles[$ug_id][$forum_id])) ? $cur_roles[$ug_id][$forum_id] : 0;
- @reset($roles);
- while (list($role_id, $role_row) = each($roles))
+ foreach ($roles as $role_id => $role_row)
{
$role_description = (!empty($user->lang[$role_row['role_description']])) ? $user->lang[$role_row['role_description']] : nl2br($role_row['role_description']);
$role_name = (!empty($user->lang[$role_row['role_name']])) ? $user->lang[$role_row['role_name']] : $role_row['role_name'];
@@ -559,8 +557,7 @@ class auth_admin extends \phpbb\auth\auth
'S_GROUP_MODE' => ($user_mode == 'group') ? true : false)
);
- @reset($content_array);
- while (list($forum_id, $forum_array) = each($content_array))
+ foreach ($content_array as $forum_id => $forum_array)
{
// Build role dropdown options
$current_role_id = (isset($cur_roles[$ug_id][$forum_id])) ? $cur_roles[$ug_id][$forum_id] : 0;
@@ -570,8 +567,7 @@ class auth_admin extends \phpbb\auth\auth
$current_role_id = (isset($cur_roles[$ug_id][$forum_id])) ? $cur_roles[$ug_id][$forum_id] : 0;
$s_role_options = '';
- @reset($roles);
- while (list($role_id, $role_row) = each($roles))
+ foreach ($roles as $role_id => $role_row)
{
$role_description = (!empty($user->lang[$role_row['role_description']])) ? $user->lang[$role_row['role_description']] : nl2br($role_row['role_description']);
$role_name = (!empty($user->lang[$role_row['role_name']])) ? $user->lang[$role_row['role_name']] : $role_row['role_name'];
@@ -1138,8 +1134,7 @@ class auth_admin extends \phpbb\auth\auth
/* @var $phpbb_permissions \phpbb\permissions */
$phpbb_permissions = $phpbb_container->get('acl.permissions');
- @reset($category_array);
- while (list($cat, $cat_array) = each($category_array))
+ foreach ($category_array as $cat => $cat_array)
{
if (!$phpbb_permissions->category_defined($cat))
{
@@ -1169,8 +1164,7 @@ class auth_admin extends \phpbb\auth\auth
}
unset($key_array, $values_array);
*/
- @reset($cat_array['permissions']);
- while (list($permission, $allowed) = each($cat_array['permissions']))
+ foreach ($cat_array['permissions'] as $permission => $allowed)
{
if (!$phpbb_permissions->permission_defined($permission))
{
@@ -1237,8 +1231,7 @@ class auth_admin extends \phpbb\auth\auth
$permissions = $permission_row[$forum_id];
ksort($permissions);
- @reset($permissions);
- while (list($permission, $auth_setting) = each($permissions))
+ foreach ($permissions as $permission => $auth_setting)
{
$cat = $phpbb_permissions->get_permission_category($permission);
diff --git a/phpBB/includes/diff/engine.php b/phpBB/includes/diff/engine.php
index 757fdadde9..0d73db02da 100644
--- a/phpBB/includes/diff/engine.php
+++ b/phpBB/includes/diff/engine.php
@@ -285,8 +285,9 @@ class diff_engine
$matches = $ymatches[$line];
reset($matches);
- while (list(, $y) = each($matches))
+ while ($y = current($matches))
{
+ next($matches);
if (empty($this->in_seq[$y]))
{
$k = $this->_lcs_pos($y);
@@ -296,8 +297,9 @@ class diff_engine
}
// no reset() here
- while (list(, $y) = each($matches))
+ while ($y = current($matches))
{
+ next($matches);
if ($y > $this->seq[$k - 1])
{
// Optimization: this is a common case: next match is just replacing previous match.
diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php
index df4c9b1875..96e108792d 100644
--- a/phpBB/includes/functions_convert.php
+++ b/phpBB/includes/functions_convert.php
@@ -1209,7 +1209,8 @@ function get_config()
if (is_array($convert->config_schema['table_format']))
{
$convert_config = array();
- list($key, $val) = each($convert->config_schema['table_format']);
+ $key = key($convert->config_schema['table_format']);
+ $val = current($convert->config_schema['table_format']);
do
{
diff --git a/phpBB/includes/mcp/mcp_logs.php b/phpBB/includes/mcp/mcp_logs.php
index 79f9d35ebe..dc098fceed 100644
--- a/phpBB/includes/mcp/mcp_logs.php
+++ b/phpBB/includes/mcp/mcp_logs.php
@@ -44,7 +44,7 @@ class mcp_logs
if (is_array($action))
{
- list($action, ) = each($action);
+ $action = key($action);
}
else
{
diff --git a/phpBB/includes/mcp/mcp_notes.php b/phpBB/includes/mcp/mcp_notes.php
index a4c2356a43..74bd1f1f62 100644
--- a/phpBB/includes/mcp/mcp_notes.php
+++ b/phpBB/includes/mcp/mcp_notes.php
@@ -42,7 +42,7 @@ class mcp_notes
if (is_array($action))
{
- list($action, ) = each($action);
+ $action = key($action);
}
$this->page_title = 'MCP_NOTES';
diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php
index df175133fc..7a8599fedd 100644
--- a/phpBB/includes/mcp/mcp_warn.php
+++ b/phpBB/includes/mcp/mcp_warn.php
@@ -41,7 +41,7 @@ class mcp_warn
if (is_array($action))
{
- list($action, ) = each($action);
+ $action = key($action);
}
$this->page_title = 'MCP_WARN';
diff --git a/phpBB/includes/startup.php b/phpBB/includes/startup.php
index d42ae58c42..5ead3b7fbb 100644
--- a/phpBB/includes/startup.php
+++ b/phpBB/includes/startup.php
@@ -23,11 +23,11 @@ $level = E_ALL & ~E_NOTICE & ~E_DEPRECATED;
error_reporting($level);
/**
-* Minimum Requirement: PHP 7.1.0
+* Minimum Requirement: PHP 7.1.3
*/
-if (version_compare(PHP_VERSION, '7.1') < 0)
+if (version_compare(PHP_VERSION, '7.1.3', '<'))
{
- die('You are running an unsupported PHP version. Please upgrade to PHP 7.1.0 or higher before trying to install or update to phpBB 3.3');
+ die('You are running an unsupported PHP version. Please upgrade to PHP 7.1.3 or higher before trying to install or update to phpBB 3.3');
}
// Register globals and magic quotes have been dropped in PHP 5.4 so no need for extra checks
diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php
index 2423af86be..d574549093 100644
--- a/phpBB/includes/ucp/ucp_groups.php
+++ b/phpBB/includes/ucp/ucp_groups.php
@@ -136,7 +136,7 @@ class ucp_groups
{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}
- list(, $row) = each($row);
+ $row = current($row);
$sql = 'SELECT group_type
FROM ' . GROUPS_TABLE . '
@@ -240,7 +240,7 @@ class ucp_groups
{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}
- list(, $row) = each($row);
+ $row = current($row);
if (!$row['group_leader'])
{
@@ -460,7 +460,7 @@ class ucp_groups
{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}
- list(, $row) = each($row);
+ $row = current($row);
if (!$row['group_leader'])
{
@@ -754,7 +754,7 @@ class ucp_groups
{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}
- list(, $row) = each($row);
+ $row = current($row);
if (!$row['group_leader'])
{
@@ -879,7 +879,7 @@ class ucp_groups
{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}
- list(, $row) = each($row);
+ $row = current($row);
if (!$row['group_leader'])
{
@@ -906,7 +906,7 @@ class ucp_groups
{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}
- list(, $row) = each($row);
+ $row = current($row);
if (!$row['group_leader'])
{
@@ -985,7 +985,7 @@ class ucp_groups
{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}
- list(, $row) = each($row);
+ $row = current($row);
if (!$row['group_leader'])
{
@@ -1046,7 +1046,7 @@ class ucp_groups
{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}
- list(, $row) = each($row);
+ $row = current($row);
if (!$row['group_leader'])
{
diff --git a/phpBB/install/app.php b/phpBB/install/app.php
index 9d04ec2156..0e6212e37a 100644
--- a/phpBB/install/app.php
+++ b/phpBB/install/app.php
@@ -20,9 +20,9 @@ define('PHPBB_ENVIRONMENT', 'production');
$phpbb_root_path = '../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
-if (version_compare(PHP_VERSION, '7.1') < 0)
+if (version_compare(PHP_VERSION, '7.1.3', '<'))
{
- die('You are running an unsupported PHP version. Please upgrade to PHP 7.1.0 or higher before trying to install or update to phpBB 3.3');
+ die('You are running an unsupported PHP version. Please upgrade to PHP 7.1.3 or higher before trying to install or update to phpBB 3.3');
}
$startup_new_path = $phpbb_root_path . 'install/update/update/new/install/startup.' . $phpEx;
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index 838ea6d30e..b5fc4f13a5 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -185,7 +185,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewprofi
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewtopic', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_lastread', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_track', '1');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jquery_url', '//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jquery_url', '//ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jumpbox', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_moderators', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_notifications', '1');
@@ -420,6 +420,7 @@ INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_chgname', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_chgpasswd', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_chgprofileinfo', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_download', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_emoji', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_hideonline', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_ignoreflood', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_masspm', 1);
diff --git a/phpBB/language/en/acp/permissions_phpbb.php b/phpBB/language/en/acp/permissions_phpbb.php
index 2c7b3d3aee..ab8939932b 100644
--- a/phpBB/language/en/acp/permissions_phpbb.php
+++ b/phpBB/language/en/acp/permissions_phpbb.php
@@ -79,6 +79,7 @@ $lang = array_merge($lang, array(
'ACL_U_SAVEDRAFTS' => 'Can save drafts',
'ACL_U_CHGCENSORS' => 'Can disable word censors',
'ACL_U_SIG' => 'Can use signature',
+ 'ACL_U_EMOJI' => 'Can use emoji and rich text characters in topic title',
'ACL_U_SENDPM' => 'Can send private messages',
'ACL_U_MASSPM' => 'Can send private messages to multiple users',
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index 53d9940560..61a7b72791 100644
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -105,7 +105,7 @@ $lang = array_merge($lang, array(
// Server requirements
'PHP_VERSION_REQD' => 'PHP version',
- 'PHP_VERSION_REQD_EXPLAIN' => 'phpBB requires PHP version 7.1.0 or higher.',
+ 'PHP_VERSION_REQD_EXPLAIN' => 'phpBB requires PHP version 7.1.3 or higher.',
'PHP_GETIMAGESIZE_SUPPORT' => 'PHP getimagesize() function is required',
'PHP_GETIMAGESIZE_SUPPORT_EXPLAIN' => 'In order for phpBB to function correctly, the getimagesize function needs to be available.',
'PCRE_UTF_SUPPORT' => 'PCRE UTF-8 support',
diff --git a/phpBB/mcp.php b/phpBB/mcp.php
index 6215a675b4..c8fb0233ff 100644
--- a/phpBB/mcp.php
+++ b/phpBB/mcp.php
@@ -61,7 +61,7 @@ if ($forum_action !== '' && $request->variable('sort', false, false, \phpbb\requ
if (count($action_ary))
{
- list($action, ) = each($action_ary);
+ $action = key($action_ary);
}
unset($action_ary);
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 35c218cd8c..e933b54c17 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -653,11 +653,12 @@ switch ($mode)
FROM ' . ZEBRA_TABLE . "
WHERE zebra_id = $user_id
AND user_id = {$user->data['user_id']}";
-
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
- $foe = (bool) $row['foe'] ?? false;
- $friend = (bool) $row['friend'] ?? false;
+
+ $foe = $row ? (bool) $row['foe'] : false;
+ $friend = $row ? (bool) $row['friend'] : false;
+
$db->sql_freeresult($result);
if ($config['load_onlinetrack'])
diff --git a/phpBB/phpbb/db/migration/data/v32x/user_emoji_permission.php b/phpBB/phpbb/db/migration/data/v32x/user_emoji_permission.php
new file mode 100644
index 0000000000..98759c78ee
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v32x/user_emoji_permission.php
@@ -0,0 +1,44 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\db\migration\data\v32x;
+
+class user_emoji_permission extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ $sql = 'SELECT auth_option_id
+ FROM ' . ACL_OPTIONS_TABLE . "
+ WHERE auth_option = 'u_emoji'";
+ $result = $this->db->sql_query($sql);
+ $auth_option_id = $this->db->sql_fetchfield('auth_option_id');
+ $this->db->sql_freeresult($result);
+
+ return $auth_option_id !== false;
+ }
+
+ static public function depends_on()
+ {
+ return [
+ '\phpbb\db\migration\data\v32x\v329rc1',
+ ];
+ }
+
+ public function update_data()
+ {
+ return [
+ ['permission.add', ['u_emoji']],
+ ['permission.permission_set', ['REGISTERED', 'u_emoji', 'group']],
+ ];
+ }
+}
diff --git a/phpBB/phpbb/feed/controller/feed.php b/phpBB/phpbb/feed/controller/feed.php
index c0d7bc72ec..7826d19042 100644
--- a/phpBB/phpbb/feed/controller/feed.php
+++ b/phpBB/phpbb/feed/controller/feed.php
@@ -308,14 +308,13 @@ class feed
* Event to modify the feed row
*
* @event core.feed_modify_feed_row
- * @var int forum_id Forum ID
- * @var string mode Feeds mode (forums|topics|topics_new|topics_active|news)
+ * @var feed_interface feed Feed instance
* @var array row Array with feed data
- * @var int topic_id Topic ID
*
* @since 3.1.10-RC1
+ * @changed 3.3.0 Replace forum_id, mode, topic_id with feed instance
*/
- $vars = array('forum_id', 'mode', 'row', 'topic_id');
+ $vars = array('feed', 'row');
extract($this->phpbb_dispatcher->trigger_event('core.feed_modify_feed_row', compact($vars)));
// BBCode options to correctly disable urls, smilies, bbcode...
diff --git a/phpBB/phpbb/install/module/requirements/task/check_server_environment.php b/phpBB/phpbb/install/module/requirements/task/check_server_environment.php
index 4607ce9ec2..41aa82623b 100644
--- a/phpBB/phpbb/install/module/requirements/task/check_server_environment.php
+++ b/phpBB/phpbb/install/module/requirements/task/check_server_environment.php
@@ -96,9 +96,7 @@ class check_server_environment extends \phpbb\install\task_base
*/
protected function check_php_version()
{
- $php_version = PHP_VERSION;
-
- if (version_compare($php_version, '7.1') < 0)
+ if (version_compare(PHP_VERSION, '7.1.3', '<'))
{
$this->response_helper->add_error_message('PHP_VERSION_REQD', 'PHP_VERSION_REQD_EXPLAIN');
diff --git a/phpBB/phpbb/permissions.php b/phpBB/phpbb/permissions.php
index 7697884b6a..236535cc6a 100644
--- a/phpBB/phpbb/permissions.php
+++ b/phpBB/phpbb/permissions.php
@@ -234,6 +234,7 @@ class permissions
'u_savedrafts' => array('lang' => 'ACL_U_SAVEDRAFTS', 'cat' => 'post'),
'u_chgcensors' => array('lang' => 'ACL_U_CHGCENSORS', 'cat' => 'post'),
'u_sig' => array('lang' => 'ACL_U_SIG', 'cat' => 'post'),
+ 'u_emoji' => array('lang' => 'ACL_U_EMOJI', 'cat' => 'post'),
'u_sendpm' => array('lang' => 'ACL_U_SENDPM', 'cat' => 'pm'),
'u_masspm' => array('lang' => 'ACL_U_MASSPM', 'cat' => 'pm'),
diff --git a/phpBB/phpbb/request/type_cast_helper.php b/phpBB/phpbb/request/type_cast_helper.php
index 912494998d..39d5908fd3 100644
--- a/phpBB/phpbb/request/type_cast_helper.php
+++ b/phpBB/phpbb/request/type_cast_helper.php
@@ -106,7 +106,8 @@ class type_cast_helper implements \phpbb\request\type_cast_helper_interface
return;
}
- list($default_key, $default_value) = each($default);
+ $default_key = key($default);
+ $default_value = current($default);
$key_type = gettype($default_key);
$_var = $var;
diff --git a/phpBB/posting.php b/phpBB/posting.php
index c5d0693f35..c4042e48e6 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -1184,21 +1184,24 @@ if ($submit || $preview || $refresh)
/**
* Replace Emojis and other 4bit UTF-8 chars not allowed by MySQL to UCR/NCR.
* Using their Numeric Character Reference's Hexadecimal notation.
+ * Check the permissions for posting Emojis first.
*/
- $post_data['post_subject'] = utf8_encode_ucr($post_data['post_subject']);
-
- /**
- * This should never happen again.
- * Leaving the fallback here just in case there will be the need of it.
- *
- * Check for out-of-bounds characters that are currently
- * not supported by utf8_bin in MySQL
- */
- if (preg_match_all('/[\x{10000}-\x{10FFFF}]/u', $post_data['post_subject'], $matches))
+ if ($auth->acl_get('u_emoji'))
+ {
+ $post_data['post_subject'] = utf8_encode_ucr($post_data['post_subject']);
+ }
+ else
{
- $character_list = implode('<br>', $matches[0]);
+ /**
+ * Check for out-of-bounds characters that are currently
+ * not supported by utf8_bin in MySQL
+ */
+ if (preg_match_all('/[\x{10000}-\x{10FFFF}]/u', $post_data['post_subject'], $matches))
+ {
+ $character_list = implode('<br>', $matches[0]);
- $error[] = $user->lang('UNSUPPORTED_CHARACTERS_SUBJECT', $character_list);
+ $error[] = $user->lang('UNSUPPORTED_CHARACTERS_SUBJECT', $character_list);
+ }
}
$post_data['poll_last_vote'] = (isset($post_data['poll_last_vote'])) ? $post_data['poll_last_vote'] : 0;
diff --git a/phpBB/search.php b/phpBB/search.php
index e50df13ea4..5d5e9f5f8a 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -1079,6 +1079,10 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$view_topic_url_params = "f=$forum_id&amp;t=$result_topic_id" . (($u_hilit) ? "&amp;hilit=$u_hilit" : '');
$view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params);
+ $folder_img = $folder_alt = $u_mcp_queue = '';
+ $topic_type = $posts_unapproved = 0;
+ $unread_topic = $topic_unapproved = $topic_deleted = false;
+
if ($show_results == 'topics')
{
if ($config['load_db_track'] && $author_id === $user->data['user_id'])
@@ -1086,7 +1090,6 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$row['topic_posted'] = 1;
}
- $folder_img = $folder_alt = $topic_type = '';
topic_status($row, $replies, (isset($topic_tracking_info[$forum_id][$row['topic_id']]) && $row['topic_last_post_time'] > $topic_tracking_info[$forum_id][$row['topic_id']]) ? true : false, $folder_img, $folder_alt, $topic_type);
$unread_topic = (isset($topic_tracking_info[$forum_id][$row['topic_id']]) && $row['topic_last_post_time'] > $topic_tracking_info[$forum_id][$row['topic_id']]) ? true : false;
@@ -1214,10 +1217,6 @@ if ($keywords || $author || $author_id || $search_id || $submit)
'U_VIEW_POST' => (!empty($row['post_id'])) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=" . $row['topic_id'] . '&amp;p=' . $row['post_id'] . (($u_hilit) ? '&amp;hilit=' . $u_hilit : '')) . '#p' . $row['post_id'] : '',
));
- $folder_img = $folder_alt = $u_mcp_queue = '';
- $topic_type = $posts_unapproved = 0;
- $unread_topic = $topic_unapproved = $topic_deleted = false;
-
/**
* Modify the topic data before it is assigned to the template
*
diff --git a/phpBB/styles/prosilver/template/posting_attach_body.html b/phpBB/styles/prosilver/template/posting_attach_body.html
index ff5bfe1b55..0363fe0f05 100644
--- a/phpBB/styles/prosilver/template/posting_attach_body.html
+++ b/phpBB/styles/prosilver/template/posting_attach_body.html
@@ -38,7 +38,7 @@
<td class="attach-name">
<span class="file-name ellipsis-text"></span>
<span class="attach-controls">
- <input type="button" value="{L_PLACE_INLINE}" class="button2 hidden file-inline-bbcode" />&nbsp;
+ {% if S_BBCODE_ALLOWED %}<input type="button" value="{{ lang('PLACE_INLINE') }}" class="button2 hidden file-inline-bbcode" />&nbsp;{% endif %}
<input type="button" value="{L_DELETE_FILE}" class="button2 file-delete" />
</span>
<span class="clear"></span>
@@ -64,7 +64,7 @@
<span class="file-name ellipsis-text"><a href="{attach_row.U_VIEW_ATTACHMENT}">{attach_row.FILENAME}</a></span>
{% EVENT posting_attach_body_attach_row_controls_prepend %}
<span class="attach-controls">
- <!-- IF S_INLINE_ATTACHMENT_OPTIONS --><input type="button" value="{L_PLACE_INLINE}" class="button2 file-inline-bbcode" />&nbsp; <!-- ENDIF -->
+ {% if S_BBCODE_ALLOWED and S_INLINE_ATTACHMENT_OPTIONS %}<input type="button" value="{{ lang('PLACE_INLINE') }}" class="button2 file-inline-bbcode" />&nbsp;{% endif %}
<input type="submit" name="delete_file[{attach_row.ASSOC_INDEX}]" value="{L_DELETE_FILE}" class="button2 file-delete" />
</span>
{% EVENT posting_attach_body_attach_row_controls_append %}