summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-07-30 05:31:48 +0200
committerThomas Tanghus <thomas@tanghus.net>2012-07-30 05:31:48 +0200
commitfa62ff62d2e48bee72aaf5b7d306abe77d90308b (patch)
treef61e5b59550fe84154c851937310744745c97f47
parentd614c3b1d5be7e05ce7248dc4a7b67f04a64a3d8 (diff)
downloadnextcloud-server-fa62ff62d2e48bee72aaf5b7d306abe77d90308b.tar.gz
nextcloud-server-fa62ff62d2e48bee72aaf5b7d306abe77d90308b.zip
Remove deprecated code.
-rw-r--r--apps/contacts/lib/app.php16
1 files changed, 0 insertions, 16 deletions
diff --git a/apps/contacts/lib/app.php b/apps/contacts/lib/app.php
index 46e03240dc2..67dfe8f640f 100644
--- a/apps/contacts/lib/app.php
+++ b/apps/contacts/lib/app.php
@@ -82,22 +82,6 @@ class OC_Contacts_App {
$card = self::getContactObject( $id );
$vcard = OC_VObject::parse($card['carddata']);
- // Try to fix cards with missing 'N' field from pre ownCloud 4. Hot damn, this is ugly...
- if(!is_null($vcard) && !$vcard->__isset('N')) {
- $version = OCP\App::getAppVersion('contacts');
- if($version >= 5) {
- OCP\Util::writeLog('contacts', 'OC_Contacts_App::getContactVCard. Deprecated check for missing N field', OCP\Util::DEBUG);
- }
- OCP\Util::writeLog('contacts', 'getContactVCard, Missing N field', OCP\Util::DEBUG);
- if($vcard->__isset('FN')) {
- OCP\Util::writeLog('contacts', 'getContactVCard, found FN field: '.$vcard->__get('FN'), OCP\Util::DEBUG);
- $n = implode(';', array_reverse(array_slice(explode(' ', $vcard->__get('FN')), 0, 2))).';;;';
- $vcard->setString('N', $n);
- OC_Contacts_VCard::edit( $id, $vcard);
- } else { // Else just add an empty 'N' field :-P
- $vcard->setString('N', 'Unknown;Name;;;');
- }
- }
if (!is_null($vcard) && !isset($vcard->REV)) {
$rev = new DateTime('@'.$card['lastmodified']);
$vcard->setString('REV', $rev->format(DateTime::W3C));