aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r--phpBB/phpbb/cron/task/core/prune_shadow_topics.php12
-rw-r--r--phpBB/phpbb/db/migration/data/v310/prune_shadow_topics.php15
2 files changed, 14 insertions, 13 deletions
diff --git a/phpBB/phpbb/cron/task/core/prune_shadow_topics.php b/phpBB/phpbb/cron/task/core/prune_shadow_topics.php
index 4d7166ccb3..75165d900d 100644
--- a/phpBB/phpbb/cron/task/core/prune_shadow_topics.php
+++ b/phpBB/phpbb/cron/task/core/prune_shadow_topics.php
@@ -73,9 +73,9 @@ class prune_shadow_topics extends \phpbb\cron\task\base implements \phpbb\cron\t
include($this->phpbb_root_path . 'includes/functions_admin.' . $this->php_ext);
}
- if ($this->forum_data['prune_shadow_topic_days'])
+ if ($this->forum_data['prune_shadow_days'])
{
- $this->auto_prune_shadow_topics($this->forum_data['forum_id'], 'shadow', $this->forum_data['forum_flags'], $this->forum_data['prune_shadow_topic_days'], $this->forum_data['prune_shadow_topic_freq']);
+ $this->auto_prune_shadow_topics($this->forum_data['forum_id'], 'shadow', $this->forum_data['forum_flags'], $this->forum_data['prune_shadow_days'], $this->forum_data['prune_shadow_freq']);
}
}
@@ -105,7 +105,7 @@ class prune_shadow_topics extends \phpbb\cron\task\base implements \phpbb\cron\t
*/
public function should_run()
{
- return $this->forum_data['enable_shadow_topic_prune'] && $this->forum_data['prune_shadow_topic_next'] < time();
+ return $this->forum_data['enable_shadow_prune'] && $this->forum_data['prune_shadow_next'] < time();
}
/**
@@ -136,7 +136,7 @@ class prune_shadow_topics extends \phpbb\cron\task\base implements \phpbb\cron\t
{
$forum_id = $request->variable('f', 0);
- $sql = 'SELECT forum_id, prune_shadow_topic_next, enable_shadow_topic_prune, prune_shadow_topic_days, forum_flags, prune_shadow_topic_freq
+ $sql = 'SELECT forum_id, prune_shadow_next, enable_shadow_prune, prune_shadow_days, forum_flags, prune_shadow_freq
FROM ' . FORUMS_TABLE . "
WHERE forum_id = $forum_id";
$result = $this->db->sql_query($sql);
@@ -176,11 +176,11 @@ class prune_shadow_topics extends \phpbb\cron\task\base implements \phpbb\cron\t
prune($forum_id, $prune_mode, $prune_date, $prune_flags, true);
$sql = 'UPDATE ' . FORUMS_TABLE . "
- SET prune_shadow_topic_next = $next_prune
+ SET prune_shadow_next = $next_prune
WHERE forum_id = $forum_id";
$this->db->sql_query($sql);
- add_log('admin', 'LOG_PRUNE_SHADOW_TOPIC', $row['forum_name']);
+ add_log('admin', 'LOG_PRUNE_SHADOW', $row['forum_name']);
}
return;
diff --git a/phpBB/phpbb/db/migration/data/v310/prune_shadow_topics.php b/phpBB/phpbb/db/migration/data/v310/prune_shadow_topics.php
index 0cf9981c14..1e7cfb5acb 100644
--- a/phpBB/phpbb/db/migration/data/v310/prune_shadow_topics.php
+++ b/phpBB/phpbb/db/migration/data/v310/prune_shadow_topics.php
@@ -21,10 +21,10 @@ class prune_shadow_topics extends \phpbb\db\migration\migration
return array(
'add_columns' => array(
$this->table_prefix . 'forums' => array(
- 'enable_shadow_topic_prune' => array('BOOL', 0, 'after' => 'prune_freq'),
- 'prune_shadow_topic_days' => array('UINT', 7, 'after' => 'enable_shadow_topic_prune'),
- 'prune_shadow_topic_freq' => array('UINT', 1, 'after' => 'prune_shadow_topic_freq'),
- 'prune_shadow_topic_next' => array('INT:11', 0, 'after' => 'prune_shadow_topic_freq'),
+ 'enable_shadow_prune' => array('BOOL', 0, 'after' => 'prune_freq'),
+ 'prune_shadow_days' => array('UINT', 7, 'after' => 'enable_shadow_prune'),
+ 'prune_shadow_freq' => array('UINT', 1, 'after' => 'prune_shadow_freq'),
+ 'prune_shadow_next' => array('INT:11', 0, 'after' => 'prune_shadow_freq'),
),
),
);
@@ -35,9 +35,10 @@ class prune_shadow_topics extends \phpbb\db\migration\migration
return array(
'drop_columns' => array(
$this->table_prefix . 'forums' => array(
- 'enable_shadow_topic_prune',
- 'prune_shadow_topic_days',
- 'prune_shadow_topic_freq',
+ 'enable_shadow_prune',
+ 'prune_shadow_days',
+ 'prune_shadow_freq',
+ 'prune_shadow_next',
),
),
);