summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-03-04 12:04:16 -0800
committerThomas Müller <thomas.mueller@tmit.eu>2013-03-04 12:04:16 -0800
commit5c061561c55b5adb6577c4ca2a2b4009b246db6d (patch)
treeb0db99493bfdd057a3801347a5c936855434391a
parentcf6db7a7cd576321f2797f400d6c1faedf8ae4e5 (diff)
parentc08a04bc839651f14816f04d10a9250ac2515f35 (diff)
downloadnextcloud-server-5c061561c55b5adb6577c4ca2a2b4009b246db6d.tar.gz
nextcloud-server-5c061561c55b5adb6577c4ca2a2b4009b246db6d.zip
Merge pull request #2078 from owncloud/save_category_relations
VCategories: Don't forget to save category relations if category exists.
-rw-r--r--lib/vcategories.php9
1 files 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;
}