mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-12 11:44:08 +02:00
- 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
This commit is contained in:
@@ -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';
|
||||
|
Reference in New Issue
Block a user