aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/acp/acp_disallow.php17
-rw-r--r--phpBB/language/en/acp/posting.php3
2 files changed, 11 insertions, 9 deletions
diff --git a/phpBB/includes/acp/acp_disallow.php b/phpBB/includes/acp/acp_disallow.php
index 2e02fb4e83..0a447a81de 100644
--- a/phpBB/includes/acp/acp_disallow.php
+++ b/phpBB/includes/acp/acp_disallow.php
@@ -34,17 +34,18 @@ class acp_disallow
if ($disallow)
{
$disallowed_user = str_replace('*', '%', request_var('disallowed_user', ''));
- $message = validate_username($disallowed_user);
- if (!$message)
+ if (!$disallowed_user)
{
- $sql = 'INSERT INTO ' . DISALLOW_TABLE . ' ' . $db->sql_build_array('INSERT', array('disallow_username' => $disallowed_user));
- $db->sql_query($sql);
-
- $message = $user->lang['DISALLOW_SUCCESSFUL'];
- add_log('admin', 'LOG_DISALLOW_ADD', str_replace('%', '*', $disallowed_user));
+ trigger_error($user->lang['NO_USERNAME_SPECIFIED'] . adm_back_link($this->u_action));
}
+ $sql = 'INSERT INTO ' . DISALLOW_TABLE . ' ' . $db->sql_build_array('INSERT', array('disallow_username' => $disallowed_user));
+ $db->sql_query($sql);
+
+ $message = $user->lang['DISALLOW_SUCCESSFUL'];
+ add_log('admin', 'LOG_DISALLOW_ADD', str_replace('%', '*', $disallowed_user));
+
trigger_error($message . adm_back_link($this->u_action));
}
else if ($allow)
@@ -53,7 +54,7 @@ class acp_disallow
if (!$disallowed_id)
{
- trigger_error($user->lang['NO_USER'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['NO_USERNAME_SPECIFIED'] . adm_back_link($this->u_action));
}
$sql = 'DELETE FROM ' . DISALLOW_TABLE . "
diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php
index b61291eec2..b5043b8dd5 100644
--- a/phpBB/language/en/acp/posting.php
+++ b/phpBB/language/en/acp/posting.php
@@ -197,7 +197,8 @@ $lang = array_merge($lang, array(
'DISALLOWED_DELETED' => 'The disallowed username has been successfully removed',
'DISALLOW_SUCCESSFUL' => 'The disallowed username has been successfully added',
- 'NO_DISALLOWED' => 'No Disallowed Usernames',
+ 'NO_DISALLOWED' => 'No Disallowed Usernames',
+ 'NO_USERNAME_SPECIFIED' => 'You haven\'t selected or entered a username to operate with.',
));
// Reasons