diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-03-15 13:03:57 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-03-15 13:03:57 +0000 |
commit | d907d066f2e0d7974766370b11dab69a59962f97 (patch) | |
tree | 146a203caa445298e084088c30311b959d00c9f1 /phpBB/includes/session.php | |
parent | 8c3f94f9ae8a1333be8c01dd2e0be74dffc91831 (diff) | |
download | forums-d907d066f2e0d7974766370b11dab69a59962f97.tar forums-d907d066f2e0d7974766370b11dab69a59962f97.tar.gz forums-d907d066f2e0d7974766370b11dab69a59962f97.tar.bz2 forums-d907d066f2e0d7974766370b11dab69a59962f97.tar.xz forums-d907d066f2e0d7974766370b11dab69a59962f97.zip |
- adding ability to assign moderator specific ban options
- fixing destroying of sql caches
- fixing referencing of sql cached queries if more than one are active on one page
- other fixes
git-svn-id: file:///svn/phpbb/trunk@5633 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/session.php')
-rw-r--r-- | phpBB/includes/session.php | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 354a77bcec..4340a77605 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -643,11 +643,11 @@ class session * Check for banned user * * Checks whether the supplied user is banned by id, ip or email. If no parameters - * are passed to the method pre-existing session data is used. This routine does - * not return on finding a banned user, it outputs a relevant message and stops - * execution. + * are passed to the method pre-existing session data is used. If $return is false + * this routine does not return on finding a banned user , it outputs a relevant + * message and stops execution. */ - function check_ban($user_id = false, $user_ip = false, $user_email = false) + function check_ban($user_id = false, $user_ip = false, $user_email = false, $return = false) { global $config, $db; @@ -684,7 +684,7 @@ class session } $db->sql_freeresult($result); - if ($banned) + if ($banned && !$return) { // Initiate environment ... since it won't be set at this stage $this->setup(); @@ -703,6 +703,11 @@ class session trigger_error($message); } + if ($banned) + { + return true; + } + return false; } @@ -928,8 +933,7 @@ class user extends session $this->img_lang = (file_exists($phpbb_root_path . 'styles/' . $this->theme['imageset_path'] . '/imageset/' . $this->lang_name)) ? $this->lang_name : $config['default_lang']; // Is board disabled and user not an admin or moderator? - // TODO - // New ACL enabling board access while offline? + // @todo new ACL enabling board access while offline? if ($config['board_disable'] && !defined('IN_LOGIN') && !$auth->acl_gets('a_', 'm_')) { $message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE'; |