зеркало из https://github.com/nextcloud/server.git
Contacts: add missing property_options template var
This commit is contained in:
Родитель
ff346ad135
Коммит
dff9585f64
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче