diff --git a/phpBB/includes/ucp/ucp_attachments.php b/phpBB/includes/ucp/ucp_attachments.php index b4566c0976..e499b3f907 100644 --- a/phpBB/includes/ucp/ucp_attachments.php +++ b/phpBB/includes/ucp/ucp_attachments.php @@ -137,6 +137,7 @@ class ucp_attachments extends module $template->assign_vars(array( 'PAGE_NUMBER' => on_page($num_attachments, $config['posts_per_page'], $start), 'PAGINATION' => generate_pagination("{$phpbb_root_path}ucp.$phpEx$SID&i=$id&sk=$sort_key&sd=$sort_dir", $num_attachments, $config['posts_per_page'], $start), + 'TOTAL_ATTACHMENTS' => $num_attachments, 'L_TITLE' => $user->lang['UCP_ATTACHMENTS'], diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php index 27002cbeaf..dde3442002 100644 --- a/phpBB/includes/ucp/ucp_prefs.php +++ b/phpBB/includes/ucp/ucp_prefs.php @@ -231,8 +231,8 @@ class ucp_prefs extends module $sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 'r' => $user->lang['REPLIES'], 's' => $user->lang['SUBJECT'], 'v' => $user->lang['VIEWS']); $sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'r' => 't.topic_replies', 's' => 't.topic_title', 'v' => 't.topic_views'); - $s_limit_days = $s_sort_key = $s_sort_dir = ''; - gen_sort_selects($limit_days, $sort_by_text, $st, $sk, $sd, &$s_limit_days, &$s_sort_key, &$s_sort_dir); + $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = ''; + gen_sort_selects($limit_days, $sort_by_text, $st, $sk, $sd, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param); $images = (isset($images)) ? $images : $user->optionget('viewimg'); $images_yes = ($images) ? ' checked="checked"' : ''; diff --git a/phpBB/includes/ucp/ucp_zebra.php b/phpBB/includes/ucp/ucp_zebra.php index b93c01a370..ca07234fc7 100644 --- a/phpBB/includes/ucp/ucp_zebra.php +++ b/phpBB/includes/ucp/ucp_zebra.php @@ -40,7 +40,7 @@ class ucp_zebra extends module extract($data); unset($data); - if ($add) + if ($add && !sizeof($error)) { $add = explode("\n", $add); @@ -138,12 +138,21 @@ class ucp_zebra extends module break; } } + else + { + $error[] = 'NOT_ADDED_' . strtoupper($mode); + } unset($user_id_ary); } + else + { + $error[] = 'USER_NOT_FOUND'; + } + $db->sql_freeresult($result); } } - else if ($usernames) + else if ($usernames && !sizeof($error)) { // Force integer values $usernames = array_map('intval', $usernames); @@ -154,9 +163,16 @@ class ucp_zebra extends module $db->sql_query($sql); } - meta_refresh(3, "ucp.$phpEx$SID&i=$id&mode=$mode"); - $message = $user->lang[strtoupper($mode) . '_UPDATED'] . '

' . sprintf($user->lang['RETURN_UCP'], "", ''); - trigger_error($message); + if (!sizeof($error)) + { + meta_refresh(3, "ucp.$phpEx$SID&i=$id&mode=$mode"); + $message = $user->lang[strtoupper($mode) . '_UPDATED'] . '

' . sprintf($user->lang['RETURN_UCP'], "", ''); + trigger_error($message); + } + else + { + $template->assign_var('ERROR', implode('
', preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error))); + } } $sql_and = ($mode == 'friends') ? 'z.friend = 1' : 'z.foe = 1';