|
From: Meik S. <acy...@ph...> - 2009-08-17 13:22:31
|
Author: acydburn
Date: Mon Aug 17 14:21:44 2009
New Revision: 10003
Log:
i am very very sorry for this hackish approach...
(ability to skip add_log calls)
Modified:
branches/phpBB-3_0_0/phpBB/includes/functions.php
branches/phpBB-3_0_0/phpBB/includes/functions_user.php
Modified: branches/phpBB-3_0_0/phpBB/includes/functions.php
==============================================================================
*** branches/phpBB-3_0_0/phpBB/includes/functions.php (original)
--- branches/phpBB-3_0_0/phpBB/includes/functions.php Mon Aug 17 14:21:44 2009
***************
*** 3150,3155 ****
--- 3150,3163 ----
{
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();
$mode = array_shift($args);
Modified: branches/phpBB-3_0_0/phpBB/includes/functions_user.php
==============================================================================
*** branches/phpBB-3_0_0/phpBB/includes/functions_user.php (original)
--- branches/phpBB-3_0_0/phpBB/includes/functions_user.php Mon Aug 17 14:21:44 2009
***************
*** 290,295 ****
--- 290,298 ----
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.
if ($config['new_member_group_default'])
{
***************
*** 299,304 ****
--- 302,309 ----
{
group_user_add($add_group_id, $user_id);
}
+
+ unset($GLOBALS['skip_add_log']);
}
}
***************
*** 3519,3530 ****
$user_data = $user_row;
}
}
!
if (empty($user_data['user_new']))
{
return false;
}
!
$sql = 'SELECT group_id
FROM ' . GROUPS_TABLE . "
WHERE group_name = 'NEWLY_REGISTERED'
--- 3524,3535 ----
$user_data = $user_row;
}
}
!
if (empty($user_data['user_new']))
{
return false;
}
!
$sql = 'SELECT group_id
FROM ' . GROUPS_TABLE . "
WHERE group_name = 'NEWLY_REGISTERED'
|