From: Thomas Tanghus Date: Mon, 4 Mar 2013 16:05:08 +0000 (+0100) Subject: VCategories: Don't forget to save category relations if category exists. X-Git-Tag: v5.0.0RC2~8^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c08a04bc839651f14816f04d10a9250ac2515f35;p=nextcloud-server.git VCategories: Don't forget to save category relations if category exists. --- 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; }