diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-03-22 10:17:48 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-03-22 10:17:48 +0000 |
commit | b206d63c51a514f3676f905dc2f11f474ba088fc (patch) | |
tree | 5e45997ad2659de52704c04884c1218d9a1c3b46 /phpBB/includes/acp/acp_disallow.php | |
parent | 95e7b127061ae487175e3fb76de35da9e7537fec (diff) | |
download | forums-b206d63c51a514f3676f905dc2f11f474ba088fc.tar forums-b206d63c51a514f3676f905dc2f11f474ba088fc.tar.gz forums-b206d63c51a514f3676f905dc2f11f474ba088fc.tar.bz2 forums-b206d63c51a514f3676f905dc2f11f474ba088fc.tar.xz forums-b206d63c51a514f3676f905dc2f11f474ba088fc.zip |
do not validate username when disallowing it. ;) - #1220
git-svn-id: file:///svn/phpbb/trunk@5694 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_disallow.php')
-rw-r--r-- | phpBB/includes/acp/acp_disallow.php | 17 |
1 files changed, 9 insertions, 8 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 . " |