mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/system-cron] Adjust SQL query style to follow coding guidelines.
PHPBB3-9596
This commit is contained in:
parent
6235957aa1
commit
6fc11184e7
2 changed files with 6 additions and 3 deletions
|
@ -50,7 +50,8 @@ class phpbb_cron_lock
|
|||
|
||||
$sql = 'UPDATE ' . CONFIG_TABLE . "
|
||||
SET config_value = '" . $db->sql_escape($this->cron_id) . "'
|
||||
WHERE config_name = 'cron_lock' AND config_value = '" . $db->sql_escape($config['cron_lock']) . "'";
|
||||
WHERE config_name = 'cron_lock'
|
||||
AND config_value = '" . $db->sql_escape($config['cron_lock']) . "'";
|
||||
$db->sql_query($sql);
|
||||
|
||||
// another cron process altered the table between script start and UPDATE query so exit
|
||||
|
@ -73,7 +74,8 @@ class phpbb_cron_lock
|
|||
|
||||
$sql = 'UPDATE ' . CONFIG_TABLE . "
|
||||
SET config_value = '0'
|
||||
WHERE config_name = 'cron_lock' AND config_value = '" . $db->sql_escape($this->cron_id) . "'";
|
||||
WHERE config_name = 'cron_lock'
|
||||
AND config_value = '" . $db->sql_escape($this->cron_id) . "'";
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,8 @@ class phpbb_cron_task_core_prune_all_forums extends phpbb_cron_task_base
|
|||
|
||||
$sql = 'SELECT forum_id, prune_next, enable_prune, prune_days, prune_viewed, forum_flags, prune_freq
|
||||
FROM ' . FORUMS_TABLE . "
|
||||
WHERE enable_prune = 1 and prune_next < " . time();
|
||||
WHERE enable_prune = 1
|
||||
AND prune_next < " . time();
|
||||
$result = $db->sql_query($sql);
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue