VCategories: Don't forget to save category relations if category exists.

This commit is contained in:
Thomas Tanghus 2013-03-04 17:05:08 +01:00
parent ef70978524
commit c08a04bc83
1 changed files with 4 additions and 5 deletions

View File

@ -348,12 +348,11 @@ class OC_VCategories {
self::$relations[] = array('objid' => $id, 'category' => $name); self::$relations[] = array('objid' => $id, 'category' => $name);
} }
} }
if(count($newones) > 0) { $this->categories = array_merge($this->categories, $newones);
$this->categories = array_merge($this->categories, $newones); if($sync === true) {
if($sync === true) { $this->save();
$this->save();
}
} }
return true; return true;
} }