]> source.dussan.org Git - nextcloud-server.git/commitdiff
VCategories: Don't forget to save category relations if category exists.
authorThomas Tanghus <thomas@tanghus.net>
Mon, 4 Mar 2013 16:05:08 +0000 (17:05 +0100)
committerThomas Tanghus <thomas@tanghus.net>
Mon, 4 Mar 2013 16:05:08 +0000 (17:05 +0100)
lib/vcategories.php

index f94a0a55d3b904ad96c9b9ceeb31737002e8bb33..2f990c5d2d2047a687eae18b6ebabdd5b4d6b5d8 100644 (file)
@@ -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;
        }