summaryrefslogtreecommitdiffstats
path: root/apps/contacts/lib/app.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/contacts/lib/app.php')
-rw-r--r--apps/contacts/lib/app.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/contacts/lib/app.php b/apps/contacts/lib/app.php
index ce52df4b75e..cc33c733007 100644
--- a/apps/contacts/lib/app.php
+++ b/apps/contacts/lib/app.php
@@ -10,8 +10,10 @@
* This class manages our app actions
*/
OC_Contacts_App::$l10n = new OC_L10N('contacts');
+OC_Contacts_App::$categories = new OC_VCategories('contacts');
class OC_Contacts_App {
public static $l10n;
+ public static $categories;
/**
* Render templates/part.details to json output
@@ -92,7 +94,7 @@ class OC_Contacts_App {
OC_Log::write('contacts','getContactVCard, found FN field: '.$vcard->__get('FN'), OC_Log::DEBUG);
$n = implode(';', array_reverse(array_slice(explode(' ', $vcard->__get('FN')), 0, 2))).';;;';
$vcard->setString('N', $n);
- OC_Contacts_VCard::edit( $id, $vcard->serialize());
+ OC_Contacts_VCard::edit( $id, $vcard);
} else { // Else just add an empty 'N' field :-P
$vcard->setString('N', 'Unknown;Name;;;');
}
@@ -153,6 +155,10 @@ class OC_Contacts_App {
}
}
+ public static function getCategories() {
+ return self::$categories->categories();
+ }
+
public static function setLastModifiedHeader($contact) {
$rev = $contact->getAsString('REV');
if ($rev) {