From 6116dc6b658873a69ec5adf267df1fb55999bf1a Mon Sep 17 00:00:00 2001
From: Thomas Tanghus <thomas@tanghus.net>
Date: Mon, 9 Jul 2012 00:14:42 +0200
Subject: [PATCH] Added default parameter $reset to allow for incremental
 rescan.

---
 lib/vcategories.php | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/vcategories.php b/lib/vcategories.php
index 8157c343868..4e73bb18d42 100644
--- a/lib/vcategories.php
+++ b/lib/vcategories.php
@@ -131,8 +131,10 @@ class OC_VCategories {
 	*	}
 	* 	$categories->rescan($objects);
 	*/
-	public function rescan($objects, $sync=true) {
-		$this->categories = array();
+	public function rescan($objects, $sync=true, $reset=true) {
+		if($reset === true) {
+			$this->categories = array();
+		}
 		foreach($objects as $object) {
 			//OC_Log::write('core','OC_VCategories::rescan: '.substr($object, 0, 100).'(...)', OC_Log::DEBUG);
 			$vobject = OC_VObject::parse($object);
-- 
GitLab