mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
i am very very sorry for this hackish approach...
(ability to skip add_log calls) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10003 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
d42e5a71d2
commit
300f6868af
2 changed files with 15 additions and 2 deletions
|
@ -3150,6 +3150,14 @@ function add_log()
|
||||||
{
|
{
|
||||||
global $db, $user;
|
global $db, $user;
|
||||||
|
|
||||||
|
// In phpBB 3.1.x i want to have logging in a class to be able to control it
|
||||||
|
// For now, we need a quite hakish approach to circumvent logging for some actions
|
||||||
|
// @todo implement cleanly
|
||||||
|
if (!empty($GLOBALS['skip_add_log']))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
|
|
||||||
$mode = array_shift($args);
|
$mode = array_shift($args);
|
||||||
|
|
|
@ -290,6 +290,9 @@ function user_add($user_row, $cp_data = false)
|
||||||
|
|
||||||
if ($add_group_id)
|
if ($add_group_id)
|
||||||
{
|
{
|
||||||
|
// Because these actions only fill the log unneccessarily we skip the add_log() entry with a little hack. :/
|
||||||
|
$GLOBALS['skip_add_log'] = true;
|
||||||
|
|
||||||
// Add user to "newly registered users" group and set to default group if admin specified so.
|
// Add user to "newly registered users" group and set to default group if admin specified so.
|
||||||
if ($config['new_member_group_default'])
|
if ($config['new_member_group_default'])
|
||||||
{
|
{
|
||||||
|
@ -299,6 +302,8 @@ function user_add($user_row, $cp_data = false)
|
||||||
{
|
{
|
||||||
group_user_add($add_group_id, $user_id);
|
group_user_add($add_group_id, $user_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unset($GLOBALS['skip_add_log']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue