aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/admin
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/admin')
-rw-r--r--phpBB/admin/admin_forums.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/phpBB/admin/admin_forums.php b/phpBB/admin/admin_forums.php
index 453551b05a..faf51852af 100644
--- a/phpBB/admin/admin_forums.php
+++ b/phpBB/admin/admin_forums.php
@@ -390,7 +390,6 @@ if( !empty($mode) )
if( $HTTP_POST_VARS['prune_enable'] )
{
- $new_forum_id = $db->sql_nextid();
if( $HTTP_POST_VARS['prune_days'] == "" || $HTTP_POST_VARS['prune_freq'] == "")
{
@@ -398,7 +397,7 @@ if( !empty($mode) )
}
$sql = "INSERT INTO " . PRUNE_TABLE . " (forum_id, prune_days, prune_freq)
- VALUES($new_forum_id, " . intval($HTTP_POST_VARS['prune_days']) . ", " . intval($HTTP_POST_VARS['prune_freq']) . ")";
+ VALUES('" . $next_id . "', " . intval($HTTP_POST_VARS['prune_days']) . ", " . intval($HTTP_POST_VARS['prune_freq']) . ")";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert row in prune table", "", __LINE__, __FILE__, $sql);
@@ -647,6 +646,13 @@ if( !empty($mode) )
{
message_die(GENERAL_ERROR, "Couldn't delete forum", "", __LINE__, __FILE__, $sql);
}
+
+ $sql = "DELETE FROM " . PRUNE_TABLE . "
+ WHERE forum_id = $from_id";
+ if( !$result = $db->sql_query($sql) )
+ {
+ message_die(GENERAL_ERROR, "Couldn't delete forum prune information!", "", __LINE__, __FILE__, $sql);
+ }
$message = $lang['Forums_updated'] . "<br /><br />" . sprintf($lang['Click_return_forumadmin'], "<a href=\"" . append_sid("admin_forums.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");