From dff9585f64e2723eaf2d088d9e946fe1d649ccd8 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Sun, 18 Dec 2011 23:04:45 +0100 Subject: [PATCH] Contacts: add missing property_options template var --- apps/contacts/index.php | 2 ++ apps/contacts/lib/app.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/contacts/index.php b/apps/contacts/index.php index de7b56dd1ae..58ddc74f532 100644 --- a/apps/contacts/index.php +++ b/apps/contacts/index.php @@ -74,11 +74,13 @@ if( !is_null($id)/* || count($contacts)*/){ $details = OC_Contacts_VCard::structureContact($vcard); } +$property_types = OC_Contacts_App::getAddPropertyOptions(); $adr_types = OC_Contacts_App::getTypesOfProperty('ADR'); $phone_types = OC_Contacts_App::getTypesOfProperty('TEL'); // Process the template $tmpl = new OC_Template( 'contacts', 'index', 'user' ); +$tmpl->assign('property_types',$property_types); $tmpl->assign('adr_types',$adr_types); $tmpl->assign('phone_types',$phone_types); $tmpl->assign('addressbooks', $addressbooks); diff --git a/apps/contacts/lib/app.php b/apps/contacts/lib/app.php index ba086e4aca8..79e00920a65 100644 --- a/apps/contacts/lib/app.php +++ b/apps/contacts/lib/app.php @@ -38,7 +38,7 @@ class OC_Contacts_App{ public static function getAddressbook($id){ $addressbook = OC_Contacts_Addressbook::find( $id ); - if( $addressbook === false || $addressbook['userid'] != OC_USER::getUser()){ + if( $addressbook === false || $addressbook['userid'] != OC_User::getUser()){ OC_JSON::error(array('data' => array( 'message' => self::$l10n->t('This is not your addressbook.')))); // Same here (as with the contact error). Could this error be improved? exit(); } -- 2.39.5