From f69c60ece8c65db2828fc28107e3c1caf8985e89 Mon Sep 17 00:00:00 2001
From: "Paul S. Owen" <psotfx@users.sourceforge.net>
Date: Tue, 2 Apr 2002 14:53:44 +0000
Subject: more changes

git-svn-id: file:///svn/phpbb/trunk@2463 89ea8834-ac86-4346-8a33-228a782c2dd0
---
 phpBB/includes/functions_admin.php | 4 ++--
 phpBB/includes/prune.php           | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

(limited to 'phpBB/includes')

diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 456742fd38..353e36b4b9 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -71,7 +71,7 @@ function sync($type, $id)
 
 			while( $row = $db->sql_fetchrow($result) )
 			{
-				sync("forum", $row['forum_id']);
+				sync('forum', $row['forum_id']);
 			}
 		   	break;
 
@@ -85,7 +85,7 @@ function sync($type, $id)
 
 			while( $row = $db->sql_fetchrow($result) )
 			{
-				sync("topic", $row['topic_id']);
+				sync('topic', $row['topic_id']);
 			}
 			break;
 
diff --git a/phpBB/includes/prune.php b/phpBB/includes/prune.php
index 84f552ec91..ed94ef1232 100644
--- a/phpBB/includes/prune.php
+++ b/phpBB/includes/prune.php
@@ -26,7 +26,6 @@ if ( !defined('IN_PHPBB') )
 }
 
 require($phpbb_root_path . 'includes/functions_search.'.$phpEx);
-require($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
 
 function prune($forum_id, $prune_date)
 {
@@ -110,8 +109,6 @@ function prune($forum_id, $prune_date)
 
 			remove_search_post($sql_post);
 
-			sync('forum', $forum_id);
-
 			return array ('topics' => $pruned_topics, 'posts' => $pruned_posts);
 		}
 	}
@@ -125,6 +122,8 @@ function prune($forum_id, $prune_date)
 //
 function auto_prune($forum_id = 0)
 {
+	require($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
+
 	global $db, $lang;
 
 	$sql = "SELECT *
@@ -142,7 +141,8 @@ function auto_prune($forum_id = 0)
 			$prune_date = time() - ( $row['prune_days'] * 86400 );
 			$next_prune = time() + ( $row['prune_freq'] * 86400 );
 
-			$pruned = prune($forum_id, $prune_date);
+			prune($forum_id, $prune_date);
+			sync('forum', $forum_id);
 
 			$sql = "UPDATE " . FORUMS_TABLE . " 
 				SET prune_next = $next_prune 
-- 
cgit v1.2.1