aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r--phpBB/includes/acp/acp_attachments.php1
-rw-r--r--phpBB/includes/acp/acp_bbcodes.php5
-rw-r--r--phpBB/includes/acp/acp_board.php4
-rw-r--r--phpBB/includes/acp/acp_database.php31
-rw-r--r--phpBB/includes/acp/acp_extensions.php50
-rw-r--r--phpBB/includes/acp/acp_forums.php2
-rw-r--r--phpBB/includes/acp/acp_groups.php9
-rw-r--r--phpBB/includes/acp/acp_icons.php3
-rw-r--r--phpBB/includes/acp/acp_prune.php84
-rw-r--r--phpBB/includes/acp/acp_styles.php6
-rw-r--r--phpBB/includes/acp/acp_users.php14
-rw-r--r--phpBB/includes/acp/auth.php6
12 files changed, 129 insertions, 86 deletions
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
index 55459739ca..2282863746 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -748,7 +748,6 @@ class acp_attachments
}
$template->assign_vars(array(
- 'PHPBB_ROOT_PATH' => $phpbb_root_path,
'IMG_PATH' => $img_path,
'ACTION' => $action,
'GROUP_ID' => $group_id,
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php
index dca39df38c..575ac84012 100644
--- a/phpBB/includes/acp/acp_bbcodes.php
+++ b/phpBB/includes/acp/acp_bbcodes.php
@@ -108,11 +108,12 @@ class acp_bbcodes
'DISPLAY_ON_POSTING' => $display_on_posting)
);
- foreach ($user->lang['tokens'] as $token => $token_explain)
+ $bbcode_tokens = array('TEXT', 'SIMPLETEXT', 'INTTEXT', 'IDENTIFIER', 'NUMBER', 'EMAIL', 'URL', 'LOCAL_URL', 'RELATIVE_URL', 'COLOR');
+ foreach ($bbcode_tokens as $token)
{
$template->assign_block_vars('token', array(
'TOKEN' => '{' . $token . '}',
- 'EXPLAIN' => ($token === 'LOCAL_URL') ? sprintf($token_explain, generate_board_url() . '/') : $token_explain,
+ 'EXPLAIN' => ($token === 'LOCAL_URL') ? $user->lang(array('tokens', $token), generate_board_url() . '/') : $user->lang(array('tokens', $token)),
));
}
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index 40dca53b76..10fbde8c9b 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -763,8 +763,8 @@ class acp_board
global $user, $config;
$act_ary = array(
- 'ACC_DISABLE' => USER_ACTIVATION_DISABLE,
- 'ACC_NONE' => USER_ACTIVATION_NONE,
+ 'ACC_DISABLE' => USER_ACTIVATION_DISABLE,
+ 'ACC_NONE' => USER_ACTIVATION_NONE,
);
if ($config['email_enable'])
{
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
index fc08a5fb94..8afc3709b9 100644
--- a/phpBB/includes/acp/acp_database.php
+++ b/phpBB/includes/acp/acp_database.php
@@ -94,29 +94,29 @@ class acp_database
case 'mysqli':
case 'mysql4':
case 'mysql':
- $extractor = new mysql_extractor($download, $store, $format, $filename, $time);
+ $extractor = new mysql_extractor($format, $filename, $time, $download, $store);
break;
case 'sqlite':
- $extractor = new sqlite_extractor($download, $store, $format, $filename, $time);
+ $extractor = new sqlite_extractor($format, $filename, $time, $download, $store);
break;
case 'postgres':
- $extractor = new postgres_extractor($download, $store, $format, $filename, $time);
+ $extractor = new postgres_extractor($format, $filename, $time, $download, $store);
break;
case 'oracle':
- $extractor = new oracle_extractor($download, $store, $format, $filename, $time);
+ $extractor = new oracle_extractor($format, $filename, $time, $download, $store);
break;
case 'mssql':
case 'mssql_odbc':
case 'mssqlnative':
- $extractor = new mssql_extractor($download, $store, $format, $filename, $time);
+ $extractor = new mssql_extractor($format, $filename, $time, $download, $store);
break;
case 'firebird':
- $extractor = new firebird_extractor($download, $store, $format, $filename, $time);
+ $extractor = new firebird_extractor($format, $filename, $time, $download, $store);
break;
}
@@ -488,7 +488,7 @@ class base_extractor
var $format;
var $run_comp = false;
- function base_extractor($download = false, $store = false, $format, $filename, $time)
+ function base_extractor($format, $filename, $time, $download = false, $store = false)
{
global $request;
@@ -1607,16 +1607,17 @@ class mssql_extractor extends base_extractor
return;
}
- $sql = "SELECT * FROM $table_name";
- $result_fields = $db->sql_query_limit($sql, 1);
-
- $row = new result_mssqlnative($result_fields);
- $i_num_fields = $row->num_fields();
+ $sql = "SELECT COLUMN_NAME, DATA_TYPE
+ FROM INFORMATION_SCHEMA.COLUMNS
+ WHERE INFORMATION_SCHEMA.COLUMNS.TABLE_NAME = '" . $db->sql_escape($table_name) . "'";
+ $result_fields = $db->sql_query($sql);
- for ($i = 0; $i < $i_num_fields; $i++)
+ $i_num_fields = 0;
+ while ($row = $db->sql_fetchrow($result_fields))
{
- $ary_type[$i] = $row->field_type($i);
- $ary_name[$i] = $row->field_name($i);
+ $ary_type[$i_num_fields] = $row['DATA_TYPE'];
+ $ary_name[$i_num_fields] = $row['COLUMN_NAME'];
+ $i_num_fields++;
}
$db->sql_freeresult($result_fields);
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index b41f4d4e81..c21c9f4e9d 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -55,6 +55,11 @@ class acp_extensions
$ext_name = '';
}
+ if (in_array($action, array('enable', 'disable', 'delete_data')) && !check_link_hash($request->variable('hash', ''), $action . '.' . $ext_name))
+ {
+ trigger_error('FORM_INVALID', E_USER_WARNING);
+ }
+
// If they've specified an extension, let's load the metadata manager and validate it.
if ($ext_name)
{
@@ -66,7 +71,7 @@ class acp_extensions
}
catch(\phpbb\extension\exception $e)
{
- trigger_error($e);
+ trigger_error($e, E_USER_WARNING);
}
}
@@ -96,8 +101,9 @@ class acp_extensions
$this->tpl_name = 'acp_ext_enable';
$template->assign_vars(array(
- 'PRE' => true,
- 'U_ENABLE' => $this->u_action . '&amp;action=enable&amp;ext_name=' . urlencode($ext_name),
+ 'PRE' => true,
+ 'L_CONFIRM_MESSAGE' => $this->user->lang('EXTENSION_ENABLE_CONFIRM', $md_manager->get_metadata('display-name')),
+ 'U_ENABLE' => $this->u_action . '&amp;action=enable&amp;ext_name=' . urlencode($ext_name) . '&amp;hash=' . generate_link_hash('enable.' . $ext_name),
));
break;
@@ -116,7 +122,7 @@ class acp_extensions
{
$template->assign_var('S_NEXT_STEP', true);
- meta_refresh(0, $this->u_action . '&amp;action=enable&amp;ext_name=' . urlencode($ext_name));
+ meta_refresh(0, $this->u_action . '&amp;action=enable&amp;ext_name=' . urlencode($ext_name) . '&amp;hash=' . generate_link_hash('enable.' . $ext_name));
}
}
}
@@ -128,7 +134,7 @@ class acp_extensions
$this->tpl_name = 'acp_ext_enable';
$template->assign_vars(array(
- 'U_RETURN' => $this->u_action . '&amp;action=list',
+ 'U_RETURN' => $this->u_action . '&amp;action=list',
));
break;
@@ -141,8 +147,9 @@ class acp_extensions
$this->tpl_name = 'acp_ext_disable';
$template->assign_vars(array(
- 'PRE' => true,
- 'U_DISABLE' => $this->u_action . '&amp;action=disable&amp;ext_name=' . urlencode($ext_name),
+ 'PRE' => true,
+ 'L_CONFIRM_MESSAGE' => $this->user->lang('EXTENSION_DISABLE_CONFIRM', $md_manager->get_metadata('display-name')),
+ 'U_DISABLE' => $this->u_action . '&amp;action=disable&amp;ext_name=' . urlencode($ext_name) . '&amp;hash=' . generate_link_hash('disable.' . $ext_name),
));
break;
@@ -154,7 +161,7 @@ class acp_extensions
{
$template->assign_var('S_NEXT_STEP', true);
- meta_refresh(0, $this->u_action . '&amp;action=disable&amp;ext_name=' . urlencode($ext_name));
+ meta_refresh(0, $this->u_action . '&amp;action=disable&amp;ext_name=' . urlencode($ext_name) . '&amp;hash=' . generate_link_hash('disable.' . $ext_name));
}
}
@@ -165,16 +172,21 @@ class acp_extensions
));
break;
- case 'purge_pre':
- $this->tpl_name = 'acp_ext_purge';
+ case 'delete_data_pre':
+ if ($phpbb_extension_manager->enabled($ext_name))
+ {
+ redirect($this->u_action);
+ }
+ $this->tpl_name = 'acp_ext_delete_data';
$template->assign_vars(array(
- 'PRE' => true,
- 'U_PURGE' => $this->u_action . '&amp;action=purge&amp;ext_name=' . urlencode($ext_name),
+ 'PRE' => true,
+ 'L_CONFIRM_MESSAGE' => $this->user->lang('EXTENSION_DELETE_DATA_CONFIRM', $md_manager->get_metadata('display-name')),
+ 'U_PURGE' => $this->u_action . '&amp;action=delete_data&amp;ext_name=' . urlencode($ext_name) . '&amp;hash=' . generate_link_hash('delete_data.' . $ext_name),
));
break;
- case 'purge':
+ case 'delete_data':
try
{
while ($phpbb_extension_manager->purge_step($ext_name))
@@ -184,7 +196,7 @@ class acp_extensions
{
$template->assign_var('S_NEXT_STEP', true);
- meta_refresh(0, $this->u_action . '&amp;action=purge&amp;ext_name=' . urlencode($ext_name));
+ meta_refresh(0, $this->u_action . '&amp;action=delete_data&amp;ext_name=' . urlencode($ext_name) . '&amp;hash=' . generate_link_hash('delete_data.' . $ext_name));
}
}
}
@@ -193,7 +205,7 @@ class acp_extensions
$template->assign_var('MIGRATOR_ERROR', $e->getLocalisedMessage($user));
}
- $this->tpl_name = 'acp_ext_purge';
+ $this->tpl_name = 'acp_ext_delete_data';
$template->assign_vars(array(
'U_RETURN' => $this->u_action . '&amp;action=list',
@@ -233,7 +245,6 @@ class acp_extensions
$this->output_actions('enabled', array(
'DISABLE' => $this->u_action . '&amp;action=disable_pre&amp;ext_name=' . urlencode($name),
- 'PURGE' => $this->u_action . '&amp;action=purge_pre&amp;ext_name=' . urlencode($name),
));
}
catch(\phpbb\extension\exception $e)
@@ -267,7 +278,7 @@ class acp_extensions
$this->output_actions('disabled', array(
'ENABLE' => $this->u_action . '&amp;action=enable_pre&amp;ext_name=' . urlencode($name),
- 'PURGE' => $this->u_action . '&amp;action=purge_pre&amp;ext_name=' . urlencode($name),
+ 'DELETE_DATA' => $this->u_action . '&amp;action=delete_data_pre&amp;ext_name=' . urlencode($name),
));
}
catch(\phpbb\extension\exception $e)
@@ -325,8 +336,9 @@ class acp_extensions
foreach ($actions as $lang => $url)
{
$this->template->assign_block_vars($block . '.actions', array(
- 'L_ACTION' => $this->user->lang($lang),
- 'U_ACTION' => $url,
+ 'L_ACTION' => $this->user->lang('EXTENSION_' . $lang),
+ 'L_ACTION_EXPLAIN' => (isset($this->user->lang['EXTENSION_' . $lang . '_EXPLAIN'])) ? $this->user->lang('EXTENSION_' . $lang . '_EXPLAIN') : '',
+ 'U_ACTION' => $url,
));
}
}
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index 258aabcc0d..029f4b23c9 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -1470,7 +1470,7 @@ class acp_forums
/**
* Event when we move content from one forum to another
*
- * @event core.acp_manage_forums_move_children
+ * @event core.acp_manage_forums_move_content
* @var int from_id If of the current parent forum
* @var int to_id If of the new parent forum
* @var bool sync Shall we sync the "to"-forum's data
diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php
index ad29a5521b..b36ea1a8d8 100644
--- a/phpBB/includes/acp/acp_groups.php
+++ b/phpBB/includes/acp/acp_groups.php
@@ -324,7 +324,11 @@ class acp_groups
$avatar_drivers = $phpbb_avatar_manager->get_enabled_drivers();
// This is normalised data, without the group_ prefix
- $avatar_data = \phpbb\avatar\manager::clean_row($group_row);
+ $avatar_data = \phpbb\avatar\manager::clean_row($group_row, 'group');
+ if (!isset($avatar_data['id']))
+ {
+ $avatar_data['id'] = 'g' . $group_id;
+ }
}
@@ -379,7 +383,7 @@ class acp_groups
}
else
{
- $driver = $phpbb_avatar_manager->get_driver($user->data['user_avatar_type']);
+ $driver = $phpbb_avatar_manager->get_driver($avatar_data['avatar_type']);
if ($driver)
{
$driver->delete($avatar_data);
@@ -657,7 +661,6 @@ class acp_groups
'GROUP_HIDDEN' => $type_hidden,
'U_BACK' => $u_back,
- 'U_SWATCH' => append_sid("{$phpbb_admin_path}swatch.$phpEx", 'form=settings&amp;name=group_colour'),
'U_ACTION' => "{$this->u_action}&amp;action=$action&amp;g=$group_id",
'L_AVATAR_EXPLAIN' => phpbb_avatar_explanation_string(),
));
diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php
index 5b23f9c3a0..658be4cc6b 100644
--- a/phpBB/includes/acp/acp_icons.php
+++ b/phpBB/includes/acp/acp_icons.php
@@ -307,7 +307,6 @@ class acp_icons
'IMG_SRC' => $phpbb_root_path . $img_path . '/' . $default_row['smiley_url'],
'IMG_PATH' => $img_path,
- 'PHPBB_ROOT_PATH' => $phpbb_root_path,
'CODE' => $default_row['code'],
'EMOTION' => $default_row['emotion'],
@@ -480,7 +479,7 @@ class acp_icons
$icons_updated++;
}
- }
+ }
}
$cache->destroy('_icons');
diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php
index 4234ec1505..5d9080b55b 100644
--- a/phpBB/includes/acp/acp_prune.php
+++ b/phpBB/includes/acp/acp_prune.php
@@ -331,23 +331,30 @@ class acp_prune
$s_find_active_time .= '<option value="' . $key . '">' . $value . '</option>';
}
- $s_group_list = '<option value="0"></option>';
$sql = 'SELECT group_id, group_name
FROM ' . GROUPS_TABLE . '
WHERE group_type <> ' . GROUP_SPECIAL . '
ORDER BY group_name ASC';
$result = $db->sql_query($sql);
+ $s_group_list = '';
while ($row = $db->sql_fetchrow($result))
{
$s_group_list .= '<option value="' . $row['group_id'] . '">' . $row['group_name'] . '</option>';
}
$db->sql_freeresult($result);
+ if ($s_group_list)
+ {
+ // Only prepend the "All groups" option if there are groups,
+ // otherwise we don't want to display this option at all.
+ $s_group_list = '<option value="0">' . $user->lang['PRUNE_USERS_GROUP_NONE'] . '</option>' . $s_group_list;
+ }
+
$template->assign_vars(array(
'U_ACTION' => $this->u_action,
'S_ACTIVE_OPTIONS' => $s_find_active_time,
- 'S_GROUP_LIST' => $s_group_list,
+ 'S_GROUP_LIST' => $s_group_list,
'S_COUNT_OPTIONS' => $s_find_count,
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=acp_prune&amp;field=users'),
));
@@ -358,12 +365,12 @@ class acp_prune
*/
function get_prune_users(&$user_ids, &$usernames)
{
- global $user, $db;
+ global $user, $db, $request;
$users_by_name = request_var('users', '', true);
$users_by_id = request_var('user_ids', array(0));
$group_id = request_var('group_id', 0);
- $posts_on_queue = request_var('posts_on_queue', 0);
+ $posts_on_queue = (trim($request->variable('posts_on_queue', '')) === '') ? false : $request->variable('posts_on_queue', 0);
if ($users_by_name)
{
@@ -450,8 +457,8 @@ class acp_prune
}
}
- // Protect the admin, do not prune if no options are given...
- if (!$where_sql)
+ // If no search criteria were provided, go no further.
+ if (!$where_sql && !$group_id && $posts_on_queue === false)
{
return;
}
@@ -468,34 +475,40 @@ class acp_prune
}
$db->sql_freeresult($result);
- // Do not prune founder members
- $sql = 'SELECT user_id, username
- FROM ' . USERS_TABLE . '
- WHERE user_id <> ' . ANONYMOUS . '
- AND user_type <> ' . USER_FOUNDER . "
- $where_sql";
- $result = $db->sql_query($sql);
+ // Protect the admin, do not prune if no options are given...
+ if ($where_sql)
+ {
+ // Do not prune founder members
+ $sql = 'SELECT user_id, username
+ FROM ' . USERS_TABLE . '
+ WHERE user_id <> ' . ANONYMOUS . '
+ AND user_type <> ' . USER_FOUNDER . "
+ $where_sql";
+ $result = $db->sql_query($sql);
- $user_ids = $usernames = array();
+ $user_ids = $usernames = array();
- while ($row = $db->sql_fetchrow($result))
- {
- // Do not prune bots and the user currently pruning.
- if ($row['user_id'] != $user->data['user_id'] && !in_array($row['user_id'], $bot_ids))
+ while ($row = $db->sql_fetchrow($result))
{
- $user_ids[] = $row['user_id'];
- $usernames[$row['user_id']] = $row['username'];
+ // Do not prune bots and the user currently pruning.
+ if ($row['user_id'] != $user->data['user_id'] && !in_array($row['user_id'], $bot_ids))
+ {
+ $user_ids[] = $row['user_id'];
+ $usernames[$row['user_id']] = $row['username'];
+ }
}
+ $db->sql_freeresult($result);
}
- $db->sql_freeresult($result);
if ($group_id)
{
$sql = 'SELECT u.user_id, u.username
FROM ' . USER_GROUP_TABLE . ' ug, ' . USERS_TABLE . ' u
WHERE ug.group_id = ' . (int) $group_id . '
- AND ug.user_pending = 0
- AND ' . $db->sql_in_set('ug.user_id', $user_ids, false, true) . '
+ AND ug.user_id <> ' . ANONYMOUS . '
+ AND u.user_type <> ' . USER_FOUNDER . '
+ AND ug.user_pending = 0 ' .
+ ((!empty($user_ids)) ? 'AND ' . $db->sql_in_set('ug.user_id', $user_ids) : '') . '
AND u.user_id = ug.user_id';
$result = $db->sql_query($sql);
@@ -505,28 +518,39 @@ class acp_prune
$user_ids = $usernames = array();
while ($row = $db->sql_fetchrow($result))
{
- $user_ids[] = $row['user_id'];
- $usernames[$row['user_id']] = $row['username'];
+ // Do not prune bots and the user currently pruning.
+ if ($row['user_id'] != $user->data['user_id'] && !in_array($row['user_id'], $bot_ids))
+ {
+ $user_ids[] = $row['user_id'];
+ $usernames[$row['user_id']] = $row['username'];
+ }
}
$db->sql_freeresult($result);
}
- if ($posts_on_queue)
+ if ($posts_on_queue !== false)
{
$sql = 'SELECT u.user_id, u.username, COUNT(p.post_id) AS queue_posts
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
- WHERE ' . $db->sql_in_set('p.poster_id', $user_ids, false, true) . '
+ WHERE u.user_id <> ' . ANONYMOUS . '
+ AND u.user_type <> ' . USER_FOUNDER .
+ ((!empty($user_ids)) ? 'AND ' . $db->sql_in_set('p.poster_id', $user_ids) : '') . '
+ AND p.post_visibility = ' . ITEM_UNAPPROVED . '
AND u.user_id = p.poster_id
GROUP BY p.poster_id
HAVING queue_posts ' . $key_match[$queue_select] . ' ' . $posts_on_queue;
- $result = $db->sql_query($result);
+ $result = $db->sql_query($sql);
// same intersection logic as the above group ID portion
$user_ids = $usernames = array();
while ($row = $db->sql_fetchrow($result))
{
- $user_ids[] = $row['user_id'];
- $usernames[$row['user_id']] = $row['username'];
+ // Do not prune bots and the user currently pruning.
+ if ($row['user_id'] != $user->data['user_id'] && !in_array($row['user_id'], $bot_ids))
+ {
+ $user_ids[] = $row['user_id'];
+ $usernames[$row['user_id']] = $row['username'];
+ }
}
$db->sql_freeresult($result);
}
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index 094d84de40..d5492d85a3 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -888,7 +888,11 @@ class acp_styles
protected function list_style(&$style, $level)
{
// Mark row as shown
- if (!empty($style['_shown'])) return;
+ if (!empty($style['_shown']))
+ {
+ return;
+ }
+
$style['_shown'] = true;
// Generate template variables
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 8853200ddc..1a7bc2d186 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -396,6 +396,9 @@ class acp_users
{
if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
{
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+ $phpbb_notifications->delete_notifications('admin_activate_user', $user_row['user_id']);
+
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
$messenger = new messenger(false);
@@ -647,8 +650,8 @@ class acp_users
while ($row = $db->sql_fetchrow($result))
{
if ($topic_id_ary[$row['topic_id']][ITEM_APPROVED] == $row['topic_posts_approved']
- && $topic_id_ary[$row['topic_id']][ITEM_UNAPPROVED] == $row['topic_posts_unapproved']
- && $topic_id_ary[$row['topic_id']][ITEM_DELETED] == $row['topic_posts_softdeleted'])
+ && $topic_id_ary[$row['topic_id']][ITEM_UNAPPROVED] == $row['topic_posts_unapproved']
+ && $topic_id_ary[$row['topic_id']][ITEM_DELETED] == $row['topic_posts_softdeleted'])
{
$move_topic_ary[] = $row['topic_id'];
}
@@ -1509,7 +1512,6 @@ class acp_users
'hideonline' => request_var('hideonline', !$user_row['user_allow_viewonline']),
'notifymethod' => request_var('notifymethod', $user_row['user_notify_type']),
'notifypm' => request_var('notifypm', $user_row['user_notify_pm']),
- 'popuppm' => request_var('popuppm', $this->optionget($user_row, 'popuppm')),
'allowpm' => request_var('allowpm', $user_row['user_allow_pm']),
'topic_sk' => request_var('topic_sk', ($user_row['user_topic_sortby_type']) ? $user_row['user_topic_sortby_type'] : 't'),
@@ -1553,7 +1555,6 @@ class acp_users
if (!sizeof($error))
{
- $this->optionset($user_row, 'popuppm', $data['popuppm']);
$this->optionset($user_row, 'viewimg', $data['view_images']);
$this->optionset($user_row, 'viewflash', $data['view_flash']);
$this->optionset($user_row, 'viewsmilies', $data['view_smilies']);
@@ -1696,7 +1697,6 @@ class acp_users
'NOTIFY_IM' => ($data['notifymethod'] == NOTIFY_IM) ? true : false,
'NOTIFY_BOTH' => ($data['notifymethod'] == NOTIFY_BOTH) ? true : false,
'NOTIFY_PM' => $data['notifypm'],
- 'POPUP_PM' => $data['popuppm'],
'BBCODE' => $data['bbcode'],
'SMILIES' => $data['smilies'],
'ATTACH_SIG' => $data['sig'],
@@ -1742,7 +1742,7 @@ class acp_users
$avatar_drivers = $phpbb_avatar_manager->get_enabled_drivers();
// This is normalised data, without the user_ prefix
- $avatar_data = \phpbb\avatar\manager::clean_row($user_row);
+ $avatar_data = \phpbb\avatar\manager::clean_row($user_row, 'user');
if ($submit)
{
@@ -1775,7 +1775,7 @@ class acp_users
}
else
{
- $driver = $phpbb_avatar_manager->get_driver($user->data['user_avatar_type']);
+ $driver = $phpbb_avatar_manager->get_driver($avatar_data['avatar_type']);
if ($driver)
{
$driver->delete($avatar_data);
diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php
index f5f90fb5b8..a023bced0a 100644
--- a/phpBB/includes/acp/auth.php
+++ b/phpBB/includes/acp/auth.php
@@ -506,7 +506,7 @@ class auth_admin extends \phpbb\auth\auth
'FORUM_ID' => $forum_id)
);
- $this->assign_cat_array($ug_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, $show_trace, ($mode == 'view'));
+ $this->assign_cat_array($ug_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, ($mode == 'view'), $show_trace);
unset($content_array[$ug_id]);
}
@@ -593,7 +593,7 @@ class auth_admin extends \phpbb\auth\auth
'FORUM_ID' => $forum_id)
);
- $this->assign_cat_array($forum_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, $show_trace, ($mode == 'view'));
+ $this->assign_cat_array($forum_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, ($mode == 'view'), $show_trace);
}
unset($hold_ary[$ug_id], $ug_names_ary[$ug_id]);
@@ -1099,7 +1099,7 @@ class auth_admin extends \phpbb\auth\auth
* Assign category to template
* used by display_mask()
*/
- function assign_cat_array(&$category_array, $tpl_cat, $tpl_mask, $ug_id, $forum_id, $show_trace = false, $s_view)
+ function assign_cat_array(&$category_array, $tpl_cat, $tpl_mask, $ug_id, $forum_id, $s_view, $show_trace = false)
{
global $template, $user, $phpbb_admin_path, $phpEx, $phpbb_container;