summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-07-09 00:14:42 +0200
committerThomas Tanghus <thomas@tanghus.net>2012-07-09 00:14:42 +0200
commit6116dc6b658873a69ec5adf267df1fb55999bf1a (patch)
tree0672039d5b6709bbbb483eed68a4e543e61bb49b /lib
parent6d123e90f30919e8d48c0b6ce6a1e871b3e6885d (diff)
downloadnextcloud-server-6116dc6b658873a69ec5adf267df1fb55999bf1a.tar.gz
nextcloud-server-6116dc6b658873a69ec5adf267df1fb55999bf1a.zip
Added default parameter $reset to allow for incremental rescan.
Diffstat (limited to 'lib')
-rw-r--r--lib/vcategories.php6
1 files 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);