From 87d4cbcce38095a30b7203d7ab3f23f098650f6d Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 10 Nov 2010 09:35:10 +0000 Subject: [PATCH] allow all fileas types as link-title types (plus value of fileas) --- addressbook/inc/class.addressbook_bo.inc.php | 3 +++ addressbook/inc/class.addressbook_hooks.inc.php | 9 +++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addressbook/inc/class.addressbook_bo.inc.php b/addressbook/inc/class.addressbook_bo.inc.php index b9c65c2fa9..2a0d7d614e 100755 --- a/addressbook/inc/class.addressbook_bo.inc.php +++ b/addressbook/inc/class.addressbook_bo.inc.php @@ -36,6 +36,9 @@ class addressbook_bo extends addressbook_so 'org_name: n_family, n_prefix', 'org_name: n_given n_family', 'org_name: n_fn', + 'org_name, org_unit: n_family, n_given', + 'org_name, adr_one_locality: n_family, n_given', + 'org_name, org_unit, adr_one_locality: n_family, n_given', 'n_family, n_given: org_name', 'n_family, n_given (org_name)', 'n_family, n_prefix: org_name', diff --git a/addressbook/inc/class.addressbook_hooks.inc.php b/addressbook/inc/class.addressbook_hooks.inc.php index 2d9f3b45ea..c113c0129d 100644 --- a/addressbook/inc/class.addressbook_hooks.inc.php +++ b/addressbook/inc/class.addressbook_hooks.inc.php @@ -189,17 +189,14 @@ class addressbook_hooks 'forced' => false, ); } + $fileas_options = ExecMethod('addressbook.addressbook_bo.fileas_options'); $settings['link_title'] = array( 'type' => 'select', 'label' => 'Link title for contacts show', 'name' => 'link_title', 'values' => array( 'n_fileas' => lang('own sorting').' ('.lang('default').': '.lang('Company').': '.lang('lastname').', '.lang('firstname').')', - 'org_name: n_family, n_given' => lang('Company').': '.lang('lastname').', '.lang('firstname'), - 'org_name, org_unit: n_family, n_given' => lang('Company').', '.lang('Department').': '.lang('lastname').', '.lang('firstname'), - 'org_name, adr_one_locality: n_family, n_given' => lang('Company').', '.lang('City').': '.lang('lastname').', '.lang('firstname'), - 'org_name, org_unit, adr_one_locality: n_family, n_given' => lang('Company').', '.lang('Department').', '.lang('City').': '.lang('lastname').', '.lang('firstname'), - ), + )+$fileas_options, // plus all fileas types 'help' => 'What should links to the addressbook display in other applications. Empty values will be left out. You need to log in anew, if you change this setting!', 'xmlrpc' => True, 'admin' => false, @@ -222,7 +219,7 @@ class addressbook_hooks 'type' => 'select', 'label' => 'Default file as format', 'name' => 'fileas_default', - 'values' => ExecMethod('addressbook.addressbook_bo.fileas_options'), + 'values' => $fileas_options, 'help' => 'Default format for fileas, eg. for new entries.', 'xmlrpc' => True, 'admin' => false,