]> source.dussan.org Git - nextcloud-server.git/commitdiff
Contacts: add missing property_options template var
authorBart Visscher <bartv@thisnet.nl>
Sun, 18 Dec 2011 22:04:45 +0000 (23:04 +0100)
committerBart Visscher <bartv@thisnet.nl>
Sun, 18 Dec 2011 22:10:43 +0000 (23:10 +0100)
apps/contacts/index.php
apps/contacts/lib/app.php

index de7b56dd1aea8a05446b0767174a8b9465370a03..58ddc74f53225950e533d5162df756bd1f894405 100644 (file)
@@ -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);
index ba086e4aca8902e1517edb77e40806de2be05876..79e00920a65fbc00201569bb2f86ea864dfb45ad 100644 (file)
@@ -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();
                }