mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
enable pruning by Post Viewed time on auto_prune
git-svn-id: file:///svn/phpbb/trunk@4567 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
fe9b0e106d
commit
1123227ad9
1 changed files with 7 additions and 2 deletions
|
@ -100,6 +100,7 @@ if (isset($_POST['update']))
|
|||
'enable_icons' => request_var('enable_icons', FALSE),
|
||||
'enable_prune' => request_var('enable_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),
|
||||
|
@ -397,6 +398,10 @@ switch ($mode)
|
|||
<td class="row1"><?php echo $user->lang['AUTO_PRUNE_DAYS'] ?>: <br /><span class="gensmall"><?php echo $user->lang['AUTO_PRUNE_DAYS_EXPLAIN']; ?></span></td>
|
||||
<td class="row2"><input class="post" type="text" name="prune_days" value="<?php echo $prune_days ?>" size="5" /> <?php echo $user->lang['DAYS']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><?php echo $user->lang['AUTO_PRUNE_VIEWED'] ?>: <br /><span class="gensmall"><?php echo $user->lang['AUTO_PRUNE_VIEWED_EXPLAIN']; ?></span></td>
|
||||
<td class="row2"><input class="post" type="text" name="prune_viewed" value="<?php echo $prune_viewed ?>" size="5" /> <?php echo $user->lang['DAYS']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><?php echo $user->lang['PRUNE_OLD_POLLS'] ?>: <br /><span class="gensmall"><?php echo $user->lang['PRUNE_OLD_POLLS_EXPLAIN']; ?></span></td>
|
||||
<td class="row2"><input type="radio" name="prune_old_polls" value="1"<?php echo $prune_old_polls_yes; ?> /> <?php echo $user->lang['YES']; ?> <input type="radio" name="prune_old_polls" value="0"<?php echo $prune_old_polls_no; ?> /> <?php echo $user->lang['NO']; ?></td>
|
||||
|
@ -852,9 +857,9 @@ function update_forum_data(&$forum_data)
|
|||
}
|
||||
}
|
||||
|
||||
if ($forum_data['prune_days'] < 0 || $forum_data['prune_freq'] < 0)
|
||||
if ($forum_data['prune_days'] < 0 || $forum_data['prune_viewed'] < 0 || $forum_data['prune_freq'] < 0)
|
||||
{
|
||||
$forum_data['prune_days'] = $forum_data['prune_freq'] = 0;
|
||||
$forum_data['prune_days'] = $forum_data['prune_viewed'] = $forum_data['prune_freq'] = 0;
|
||||
$errors[] = $user->lang['FORUM_DATA_NEGATIVE'];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue