aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/adm/style/acp_ext_actions.html7
-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/ucp/ucp_groups.php16
-rw-r--r--phpBB/install/schemas/schema_data.sql2
-rw-r--r--phpBB/mcp.php2
-rw-r--r--phpBB/phpbb/feed/controller/feed.php7
-rw-r--r--phpBB/phpbb/request/type_cast_helper.php3
-rw-r--r--phpBB/search.php9
-rw-r--r--phpBB/styles/prosilver/template/posting_attach_body.html4
16 files changed, 73 insertions, 56 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/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/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/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index 838ea6d30e..6cec5ad1ef 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');
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/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/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/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 %}