diff --git a/phpBB/adm/admin_board.php b/phpBB/adm/admin_board.php
index e3ad82465a..4a2ba30d10 100644
--- a/phpBB/adm/admin_board.php
+++ b/phpBB/adm/admin_board.php
@@ -386,10 +386,6 @@ switch ($mode)
lang['FLOOD_INTERVAL']; ?>: lang['FLOOD_INTERVAL_EXPLAIN']; ?> |
|
-
- lang['SEARCH_INTERVAL']; ?>: lang['SEARCH_INTERVAL_EXPLAIN']; ?> |
- |
-
lang['MIN_SEARCH_CHARS']; ?>: lang['MIN_SEARCH_CHARS_EXPLAIN']; ?>
| |
@@ -575,6 +571,10 @@ switch ($mode)
lang['YES_SEARCH']; ?>: lang['YES_SEARCH_EXPLAIN']; ?> |
/>lang['YES'] ?> /> lang['NO']; ?> |
+
+ lang['SEARCH_INTERVAL']; ?>: lang['SEARCH_INTERVAL_EXPLAIN']; ?> |
+ |
+
lang['YES_SEARCH_UPDATE']; ?>: lang['YES_SEARCH_UPDATE_EXPLAIN']; ?> |
/>lang['YES'] ?> /> lang['NO']; ?> |
diff --git a/phpBB/adm/admin_prune.php b/phpBB/adm/admin_prune.php
index 275ffb71a4..6318f04785 100644
--- a/phpBB/adm/admin_prune.php
+++ b/phpBB/adm/admin_prune.php
@@ -44,12 +44,16 @@ if (!$auth->acl_get('a_prune'))
}
// Get the forum ID for pruning
-$forum_id = (isset($_REQUEST['f'])) ? intval($_REQUEST['f']) : 0;
+$forum_id = (isset($_REQUEST['f'])) ? array_map('intval', $_REQUEST['f']) : 0;
// Check for submit to be equal to Prune. If so then proceed with the pruning.
-if (isset($_POST['doprune']))
+if (isset($_POST['submit']))
{
$prunedays = (isset($_POST['prunedays'])) ? intval($_POST['prunedays']) : 0;
+ $prune_flags = 0;
+ $prune_flags += (!empty($_POST['prune_old_polls'])) ? 2 : 0;
+ $prune_flags += (!empty($_POST['prune_announce'])) ? 4 : 0;
+ $prune_flags += (!empty($_POST['prune_sticky'])) ? 8 : 0;
// Convert days to seconds for timestamp functions...
$prunedate = time() - ($prunedays * 86400);
@@ -70,12 +74,14 @@ if (isset($_POST['doprune']))
sql_query($sql);
if ($row = $db->sql_fetchrow($result))
@@ -84,9 +90,12 @@ if (isset($_POST['doprune']))
$log_data = '';
do
{
- $prune_ids[] = $row['forum_id'];
- $p_result = prune($row['forum_id'], $prunedate, FALSE);
- $row_class = ($row_class == 'row1') ? 'row2' : 'row1';
+ if ($auth->acl_get('f_list', $row['forum_id']))
+ {
+ $p_result = prune($row['forum_id'], $prunedate, $prune_flags, FALSE);
+ $prune_ids[] = $row['forum_id'];
+
+ $row_class = ($row_class == 'row1') ? 'row2' : 'row1';
?>
@@ -96,14 +105,15 @@ if (isset($_POST['doprune']))
sql_fetchrow($result));
- add_log('admin', 'log_prune', $log_data);
-
// Sync all pruned forums at once
sync('forum', 'forum_id', $prune_ids, TRUE);
+
+ add_log('admin', 'LOG_PRUNE', $log_data);
}
else
{
@@ -143,9 +153,6 @@ adm_page_header($user->lang['PRUNE']);
if (!$forum_id)
{
- // Output a selection table if no forum id has been specified.
- $select_list = make_forum_select(false, false, false);
-
?>
@@ -165,19 +172,32 @@ if (!$forum_id)
}
else
{
- $sql = "SELECT forum_name
- FROM " . FORUMS_TABLE . "
- WHERE forum_id = $forum_id";
+ $sql = 'SELECT forum_id, forum_name
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_id IN (' . implode(', ', $forum_id) . ')';
$result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
+ if (!($row = $db->sql_fetchrow($result)))
+ {
+ trigger_error($user->lang['NO_FORUM']);
+ }
+
+ $forum_list = $s_hidden_fields = '';
+ do
+ {
+ $forum_list .= (($forum_list != '') ? ', ' : '') . '' . $row['forum_name'] . '';
+ $s_hidden_fields .= '';
+ }
+ while ($row = $db->sql_fetchrow($result));
$db->sql_freeresult($result);
- $forum_name = ($forum_id == -1) ? $user->lang['ALL_FORUMS'] : $row['forum_name'];
+ $l_selected_forums = (sizeof($forum_id) == 1) ? 'SELECTED_FORUM' : 'SELECTED_FORUMS';
?>
-lang['FORUM'] . ': ' . $forum_name; ?>
+lang['FORUM']; ?>
+
+lang[$l_selected_forums] . ': ' . $forum_list; ?>