diff options
author | Igor Wiedler <igor@wiedler.ch> | 2011-03-23 23:21:23 +0100 |
---|---|---|
committer | Igor Wiedler <igor@wiedler.ch> | 2011-03-23 23:21:23 +0100 |
commit | 2f6b046f4b2a95b8d0c459d6b1f10833ffe02473 (patch) | |
tree | e0c2e21a7968a983d380a6f554d7a5331e22e295 /phpBB | |
parent | 200c7e3c446aaa95397ac379f6eb2aa3b620ccd6 (diff) | |
parent | 1564c01c38742037bf44f87c03c96384344fd17b (diff) | |
download | forums-2f6b046f4b2a95b8d0c459d6b1f10833ffe02473.tar forums-2f6b046f4b2a95b8d0c459d6b1f10833ffe02473.tar.gz forums-2f6b046f4b2a95b8d0c459d6b1f10833ffe02473.tar.bz2 forums-2f6b046f4b2a95b8d0c459d6b1f10833ffe02473.tar.xz forums-2f6b046f4b2a95b8d0c459d6b1f10833ffe02473.zip |
Merge remote branch 'nickvergessen/ticket/10033' into develop-olympus
* nickvergessen/ticket/10033:
[ticket/10033] "Disallow usernames" does not check already disallowed names.
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/acp/acp_disallow.php | 12 | ||||
-rw-r--r-- | phpBB/language/en/acp/posting.php | 4 |
2 files changed, 14 insertions, 2 deletions
diff --git a/phpBB/includes/acp/acp_disallow.php b/phpBB/includes/acp/acp_disallow.php index 9549955cc8..e2176b7bcd 100644 --- a/phpBB/includes/acp/acp_disallow.php +++ b/phpBB/includes/acp/acp_disallow.php @@ -56,6 +56,18 @@ class acp_disallow trigger_error($user->lang['NO_USERNAME_SPECIFIED'] . adm_back_link($this->u_action), E_USER_WARNING); } + $sql = 'SELECT disallow_id + FROM ' . DISALLOW_TABLE . " + WHERE disallow_username = '" . $db->sql_escape($disallowed_user) . "'"; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if ($row) + { + trigger_error($user->lang['DISALLOWED_ALREADY'] . adm_back_link($this->u_action), E_USER_WARNING); + } + $sql = 'INSERT INTO ' . DISALLOW_TABLE . ' ' . $db->sql_build_array('INSERT', array('disallow_username' => $disallowed_user)); $db->sql_query($sql); diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php index 443f4a3ea2..25152dd766 100644 --- a/phpBB/language/en/acp/posting.php +++ b/phpBB/language/en/acp/posting.php @@ -233,13 +233,13 @@ $lang = array_merge($lang, array( // Disallow Usernames $lang = array_merge($lang, array( - 'ACP_DISALLOW_EXPLAIN' => 'Here you can control usernames which will not be allowed to be used. Disallowed usernames are allowed to contain a wildcard character of *. Please note that you will not be allowed to specify any username that has already been registered, you must first delete that name then disallow it.', + 'ACP_DISALLOW_EXPLAIN' => 'Here you can control usernames which will not be allowed to be used. Disallowed usernames are allowed to contain a wildcard character of *.', 'ADD_DISALLOW_EXPLAIN' => 'You can disallow a username using the wildcard character * to match any character.', 'ADD_DISALLOW_TITLE' => 'Add a disallowed username', 'DELETE_DISALLOW_EXPLAIN' => 'You can remove a disallowed username by selecting the username from this list and clicking submit.', 'DELETE_DISALLOW_TITLE' => 'Remove a disallowed username', - 'DISALLOWED_ALREADY' => 'The name you entered could not be disallowed. It either already exists in the list, exists in the word censor list, or a matching username is present.', + 'DISALLOWED_ALREADY' => 'The name you entered is already disallowed.', 'DISALLOWED_DELETED' => 'The disallowed username has been successfully removed.', 'DISALLOW_SUCCESSFUL' => 'The disallowed username has been successfully added.', |