aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_user.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2011-04-11 00:29:48 +0200
committerAndreas Fischer <bantu@phpbb.com>2011-04-11 00:29:48 +0200
commit259929ad4e7e0c527f652e3bff1db48e7533fd08 (patch)
tree92e1d28c7271ad995e3a306bf75ba31922008cbd /phpBB/includes/functions_user.php
parentc910ce1cc6763bd31e7be6548f86b5c571c725c5 (diff)
downloadforums-259929ad4e7e0c527f652e3bff1db48e7533fd08.tar
forums-259929ad4e7e0c527f652e3bff1db48e7533fd08.tar.gz
forums-259929ad4e7e0c527f652e3bff1db48e7533fd08.tar.bz2
forums-259929ad4e7e0c527f652e3bff1db48e7533fd08.tar.xz
forums-259929ad4e7e0c527f652e3bff1db48e7533fd08.zip
[ticket/10128] Pass E_USER_WARNING to trigger_error() calls from user_ban().
The user_ban() function is shared by the MCP and the ACP. Mark trigger_error() calls as errors by passing E_USER_WARNING to make the error message appear on red background (instead of green background) in the ACP. PHPBB3-10128
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r--phpBB/includes/functions_user.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 89ce52dc39..6b5cca8abb 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -733,7 +733,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
}
else
{
- trigger_error('LENGTH_BAN_INVALID');
+ trigger_error('LENGTH_BAN_INVALID', E_USER_WARNING);
}
}
}
@@ -793,7 +793,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
// Make sure we have been given someone to ban
if (!sizeof($sql_usernames))
{
- trigger_error('NO_USER_SPECIFIED');
+ trigger_error('NO_USER_SPECIFIED', E_USER_WARNING);
}
$sql = 'SELECT user_id
@@ -824,7 +824,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
else
{
$db->sql_freeresult($result);
- trigger_error('NO_USERS');
+ trigger_error('NO_USERS', E_USER_WARNING);
}
$db->sql_freeresult($result);
break;
@@ -926,7 +926,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
if (empty($banlist_ary))
{
- trigger_error('NO_IPS_DEFINED');
+ trigger_error('NO_IPS_DEFINED', E_USER_WARNING);
}
}
break;
@@ -954,12 +954,12 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
if (sizeof($ban_list) == 0)
{
- trigger_error('NO_EMAILS_DEFINED');
+ trigger_error('NO_EMAILS_DEFINED', E_USER_WARNING);
}
break;
default:
- trigger_error('NO_MODE');
+ trigger_error('NO_MODE', E_USER_WARNING);
break;
}