1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-06 23:55:26 +02:00

* Error handling on bans

* Missing language strings
* Grammatical correction in viewtopic (singular vs plural)


git-svn-id: file:///svn/phpbb/trunk@6199 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Graham Eames 2006-07-21 20:44:27 +00:00
parent 73ac6b1423
commit 5879c1c5c1
5 changed files with 10 additions and 2 deletions

View File

@ -533,6 +533,12 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
} }
$sql_usernames = implode(', ', $sql_usernames); $sql_usernames = implode(', ', $sql_usernames);
// Make sure we have been given someone to ban
if (empty($sql_usernames))
{
trigger_error($user->lang['NO_USER_SPECIFIED']);
}
$sql = 'SELECT user_id $sql = 'SELECT user_id
FROM ' . USERS_TABLE . ' FROM ' . USERS_TABLE . '
WHERE username IN (' . $sql_usernames . ')'; WHERE username IN (' . $sql_usernames . ')';

View File

@ -237,7 +237,6 @@ $lang = array_merge($lang, array(
'NOTIFY' => 'Notification', 'NOTIFY' => 'Notification',
'NO_ADMIN' => 'You are not authorised to administer this board.', 'NO_ADMIN' => 'You are not authorised to administer this board.',
'NO_EMAILS_DEFINED' => 'No valid email addresses found', 'NO_EMAILS_DEFINED' => 'No valid email addresses found',
'NO_IPS_DEFINED' => 'No IPs or Hostnames defined',
'OFF' => 'OFF', 'OFF' => 'OFF',
'ON' => 'ON', 'ON' => 'ON',

View File

@ -317,6 +317,7 @@ $lang = array_merge($lang, array(
'NO_FORUMS' => 'This board has no forums', 'NO_FORUMS' => 'This board has no forums',
'NO_GROUP' => 'The requested usergroup does not exist.', 'NO_GROUP' => 'The requested usergroup does not exist.',
'NO_GROUP_MEMBERS' => 'This group currently has no members', 'NO_GROUP_MEMBERS' => 'This group currently has no members',
'NO_IPS_DEFINED' => 'No IPs or Hostnames defined',
'NO_MEMBERS' => 'No members found for this search criteria', 'NO_MEMBERS' => 'No members found for this search criteria',
'NO_MESSAGES' => 'No messages', 'NO_MESSAGES' => 'No messages',
'NO_MODERATORS' => 'No moderators assigned at this board.', 'NO_MODERATORS' => 'No moderators assigned at this board.',
@ -331,6 +332,7 @@ $lang = array_merge($lang, array(
'NO_UNREAD_PM' => '<strong>0</strong> unread messages', 'NO_UNREAD_PM' => '<strong>0</strong> unread messages',
'NO_USER' => 'The requested user does not exist.', 'NO_USER' => 'The requested user does not exist.',
'NO_USERS' => 'The requested users do not exist', 'NO_USERS' => 'The requested users do not exist',
'NO_USER_SPECIFIED' => 'No username was specified',
'OCCUPATION' => 'Occupation', 'OCCUPATION' => 'Occupation',
'OFFLINE' => 'Offline', 'OFFLINE' => 'Offline',

View File

@ -18,7 +18,7 @@
<h2><a class="titles" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2> <h2><a class="titles" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2>
<!-- IF MODERATORS --> <!-- IF MODERATORS -->
<p class="moderators">{L_MODERATORS}: {MODERATORS}</p> <p class="moderators"><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->: {MODERATORS}</p>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF U_MCP --> <!-- IF U_MCP -->
<p class="linkmcp">[ <a href="{U_MCP}">{L_MCP}</a> ]</p> <p class="linkmcp">[ <a href="{U_MCP}">{L_MCP}</a> ]</p>

View File

@ -538,6 +538,7 @@ $template->assign_vars(array(
'S_SELECT_SORT_DIR' => $s_sort_dir, 'S_SELECT_SORT_DIR' => $s_sort_dir,
'S_SELECT_SORT_KEY' => $s_sort_key, 'S_SELECT_SORT_KEY' => $s_sort_key,
'S_SELECT_SORT_DAYS' => $s_limit_days, 'S_SELECT_SORT_DAYS' => $s_limit_days,
'S_SINGLE_MODERATOR' => (!empty($forum_moderators[$forum_id]) && sizeof($forum_moderators[$forum_id]) > 1) ? false : true,
'S_TOPIC_ACTION' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;start=$start"), 'S_TOPIC_ACTION' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;start=$start"),
'S_TOPIC_MOD' => ($topic_mod != '') ? '<select name="action">' . $topic_mod . '</select>' : '', 'S_TOPIC_MOD' => ($topic_mod != '') ? '<select name="action">' . $topic_mod . '</select>' : '',
'S_MOD_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "t=$topic_id&amp;f=$forum_id&amp;quickmod=1&amp;redirect=" . urlencode(str_replace('&amp;', '&', $viewtopic_url)), true, $user->session_id), 'S_MOD_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "t=$topic_id&amp;f=$forum_id&amp;quickmod=1&amp;redirect=" . urlencode(str_replace('&amp;', '&', $viewtopic_url)), true, $user->session_id),