From fa62ff62d2e48bee72aaf5b7d306abe77d90308b Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Mon, 30 Jul 2012 05:31:48 +0200 Subject: Remove deprecated code. --- apps/contacts/lib/app.php | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'apps') 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)); -- cgit v1.2.3