diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2007-04-29 12:30:22 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-04-29 12:30:22 +0000 |
commit | 290187c6c79d069ea669384c515ba38965ff1002 (patch) | |
tree | b19f7a3ee1413b8405cbf9e3ce221a19080491ea /phpBB/includes/functions_user.php | |
parent | c262c4addbb8d18fdd3a84d0a4b64dd9899320c0 (diff) | |
download | forums-290187c6c79d069ea669384c515ba38965ff1002.tar forums-290187c6c79d069ea669384c515ba38965ff1002.tar.gz forums-290187c6c79d069ea669384c515ba38965ff1002.tar.bz2 forums-290187c6c79d069ea669384c515ba38965ff1002.tar.xz forums-290187c6c79d069ea669384c515ba38965ff1002.zip |
more bugfixing. Important change: admins able to give ban reason for user quick tool ban - logging also syndicated, now always logged to ACP and MCP logs.
git-svn-id: file:///svn/phpbb/trunk@7426 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r-- | phpBB/includes/functions_user.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 6ca04eb134..02665810ac 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -946,7 +946,10 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas // Update log $log_entry = ($ban_exclude) ? 'LOG_BAN_EXCLUDE_' : 'LOG_BAN_'; + + // Add to moderator and admin log add_log('admin', $log_entry . strtoupper($mode), $ban_reason, $ban_list_log); + add_log('mod', 0, 0, $log_entry . strtoupper($mode), $ban_reason, $ban_list_log); return true; } @@ -1012,7 +1015,9 @@ function user_unban($mode, $ban) WHERE ' . $db->sql_in_set('ban_id', $unban_sql); $db->sql_query($sql); + // Add to moderator and admin log add_log('admin', 'LOG_UNBAN_' . strtoupper($mode), $l_unban_list); + add_log('mod', 0, 0, 'LOG_UNBAN_' . strtoupper($mode), $l_unban_list); } return false; @@ -1147,13 +1152,18 @@ function validate_num($num, $optional = false, $min = 0, $max = 1E99) * * @return boolean|string Either false if validation succeeded or a string which will be used as the error message (with the variable name appended) */ -function validate_match($string, $optional = false, $match) +function validate_match($string, $optional = false, $match = '') { if (empty($string) && $optional) { return false; } + if (empty($match)) + { + return false; + } + if (!preg_match($match, $string)) { return 'WRONG_DATA'; |