1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-19 07:08:09 +01:00

[ticket/12150] Add missing prune settings variables in acp_forums

PHPBB3-12150
This commit is contained in:
Marc Alexander 2014-02-02 12:52:57 +01:00
parent 02fdae4e88
commit d97c58aeea
3 changed files with 9 additions and 3 deletions

View File

@ -280,8 +280,8 @@
</dl>
<dl>
<dt><label for="enable_shadow_topic_prune">{L_FORUM_PRUNE_SHADOW_TOPICS}{L_COLON}</label><br /><span>{L_FORUM_PRUNE_SHADOW_TOPICS_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="enable_shadow_topic_prune" value="1"<!-- IF S_PRUNE_ENABLE --> id="enable_shadow_topic_prune" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="enable_shadow_topic_prune" value="0"<!-- IF not S_PRUNE_ENABLE --> id="enable_shadow_topic_prune" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
<dd><label><input type="radio" class="radio" name="enable_shadow_topic_prune" value="1"<!-- IF S_PRUNE_SHADOW_TOPIC_ENABLE --> id="enable_shadow_topic_prune" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="enable_shadow_topic_prune" value="0"<!-- IF not S_PRUNE_SHADOW_TOPIC_ENABLE --> id="enable_shadow_topic_prune" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
<dt><label for="prune_shadow_topic_freq">{L_AUTO_PRUNE_FREQ}{L_COLON}</label><br /><span>{L_AUTO_PRUNE_FREQ_EXPLAIN}</span></dt>

View File

@ -138,12 +138,15 @@ class acp_forums
'enable_prune' => request_var('enable_prune', false),
'enable_post_review' => request_var('enable_post_review', true),
'enable_quick_reply' => request_var('enable_quick_reply', false),
'enable_shadow_topic_prune' => request_var('enable_shadow_topic_prune', false),
'prune_days' => request_var('prune_days', 7),
'prune_viewed' => request_var('prune_viewed', 7),
'prune_freq' => request_var('prune_freq', 1),
'prune_old_polls' => request_var('prune_old_polls', false),
'prune_announce' => request_var('prune_announce', false),
'prune_sticky' => request_var('prune_sticky', false),
'prune_shadow_topic_days' => request_var('prune_shadow_topic_days', 7),
'prune_shadow_topic_freq' => request_var('prune_shadow_topic_freq', 1),
'forum_password' => request_var('forum_password', '', true),
'forum_password_confirm'=> request_var('forum_password_confirm', '', true),
'forum_password_unset' => request_var('forum_password_unset', false),
@ -639,6 +642,8 @@ class acp_forums
'PRUNE_FREQ' => $forum_data['prune_freq'],
'PRUNE_DAYS' => $forum_data['prune_days'],
'PRUNE_VIEWED' => $forum_data['prune_viewed'],
'PRUNE_SHADOW_TOPIC_FREQ' => $forum_data['prune_shadow_topic_freq'],
'PRUNE_SHADOW_TOPIC_DAYS' => $forum_data['prune_shadow_topic_days'],
'TOPICS_PER_PAGE' => $forum_data['forum_topics_per_page'],
'FORUM_RULES_LINK' => $forum_data['forum_rules_link'],
'FORUM_RULES' => $forum_data['forum_rules'],
@ -671,6 +676,7 @@ class acp_forums
'S_DISPLAY_SUBFORUM_LIST' => ($forum_data['display_subforum_list']) ? true : false,
'S_DISPLAY_ON_INDEX' => ($forum_data['display_on_index']) ? true : false,
'S_PRUNE_ENABLE' => ($forum_data['enable_prune']) ? true : false,
'S_PRUNE_SHADOW_TOPIC_ENABLE' => ($forum_data['enable_shadow_topic_prune']) ? true : false,
'S_FORUM_LINK_TRACK' => ($forum_data['forum_flags'] & FORUM_FLAG_LINK_TRACK) ? true : false,
'S_PRUNE_OLD_POLLS' => ($forum_data['forum_flags'] & FORUM_FLAG_PRUNE_POLL) ? true : false,
'S_PRUNE_ANNOUNCE' => ($forum_data['forum_flags'] & FORUM_FLAG_PRUNE_ANNOUNCE) ? true : false,

View File

@ -75,7 +75,7 @@ class prune_shadow_topics extends \phpbb\cron\task\base implements \phpbb\cron\t
if ($this->forum_data['prune_shadow_topic_days'])
{
auto_prune($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_topic_days'], $this->forum_data['prune_shadow_topic_freq']);
}
}