From c08a04bc839651f14816f04d10a9250ac2515f35 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Mon, 4 Mar 2013 17:05:08 +0100 Subject: [PATCH] VCategories: Don't forget to save category relations if category exists. --- lib/vcategories.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/vcategories.php b/lib/vcategories.php index f94a0a55d3b..2f990c5d2d2 100644 --- a/lib/vcategories.php +++ b/lib/vcategories.php @@ -348,12 +348,11 @@ class OC_VCategories { self::$relations[] = array('objid' => $id, 'category' => $name); } } - if(count($newones) > 0) { - $this->categories = array_merge($this->categories, $newones); - if($sync === true) { - $this->save(); - } + $this->categories = array_merge($this->categories, $newones); + if($sync === true) { + $this->save(); } + return true; }