summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-04-12 22:23:42 +0200
committerBart Visscher <bartv@thisnet.nl>2012-04-12 23:10:49 +0200
commit815649dbd7a8e8d6dfd92ca6ccaa157d1f80a8c1 (patch)
tree6b19dd566f08cdb1ce12ca3491c519af6865d8b4 /lib
parent56bc2c4591269613eeaaf4eaf98e6e5b7e4a069a (diff)
downloadnextcloud-server-815649dbd7a8e8d6dfd92ca6ccaa157d1f80a8c1.tar.gz
nextcloud-server-815649dbd7a8e8d6dfd92ca6ccaa157d1f80a8c1.zip
Implement default categories in OC_VCategories
Diffstat (limited to 'lib')
-rw-r--r--lib/vcategories.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/vcategories.php b/lib/vcategories.php
index 5a7bacd2025..9d272eeabd4 100644
--- a/lib/vcategories.php
+++ b/lib/vcategories.php
@@ -50,13 +50,12 @@ class OC_VCategories {
* parameter should normally be omitted but to make an app able to
* update categories for all users it is made possible to provide it.
* @param $defcategories An array of default categories to be used if none is stored.
- * NOTE: Not implemented.
*/
- public function __construct($app, $user=null, $defcategories=null) {
+ public function __construct($app, $user=null, $defcategories=array()) {
$this->app = $app;
$this->user = is_null($user) ? OC_User::getUser() : $user;
$categories = trim(OC_Preferences::getValue($this->user, $app, self::PREF_CATEGORIES_LABEL, ''));
- $this->categories = $categories != '' ? unserialize($categories) : array();
+ $this->categories = $categories != '' ? unserialize($categories) : $defcategories;
}
/**