mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
git-svn-id: file:///svn/phpbb/trunk@7024 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
2a0425ffca
commit
5de69acfe2
1 changed files with 4 additions and 3 deletions
|
@ -2685,14 +2685,14 @@ function tidy_warnings()
|
||||||
$expire_date = time() - ($config['warnings_expire_days'] * 86400);
|
$expire_date = time() - ($config['warnings_expire_days'] * 86400);
|
||||||
$warning_list = $user_list = array();
|
$warning_list = $user_list = array();
|
||||||
|
|
||||||
$sql = 'SELECT * FROM ' . WARNINGS_TABLE . "
|
$sql = 'SELECT * FROM ' . WARNINGS_TABLE;/* . "
|
||||||
WHERE warning_time < $expire_date";
|
WHERE warning_time < $expire_date";*/
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
$warning_list[] = $row['warning_id'];
|
$warning_list[] = $row['warning_id'];
|
||||||
$user_list[$row['user_id']] = isset($user_list[$row['user_id']]) ? $user_list[$row['user_id']]++ : 1;
|
$user_list[$row['user_id']] = isset($user_list[$row['user_id']]) ? ++$user_list[$row['user_id']] : 1;
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
@ -2708,6 +2708,7 @@ function tidy_warnings()
|
||||||
{
|
{
|
||||||
$sql = 'UPDATE ' . USERS_TABLE . " SET user_warnings = user_warnings - $value
|
$sql = 'UPDATE ' . USERS_TABLE . " SET user_warnings = user_warnings - $value
|
||||||
WHERE user_id = $user_id";
|
WHERE user_id = $user_id";
|
||||||
|
var_dump($sql);
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue