From fcd0e6364e90f9ca49e5d4a6d27183a40d04b237 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 26 Aug 2011 10:14:17 +0000 Subject: [PATCH] backported r33878, r33880 from Nathan to display supported fileformats in addressbook prefs --- addressbook/inc/class.addressbook_hooks.inc.php | 4 ++-- etemplate/inc/class.bo_merge.inc.php | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/addressbook/inc/class.addressbook_hooks.inc.php b/addressbook/inc/class.addressbook_hooks.inc.php index c30cb079da..c299ac26af 100644 --- a/addressbook/inc/class.addressbook_hooks.inc.php +++ b/addressbook/inc/class.addressbook_hooks.inc.php @@ -266,7 +266,7 @@ class addressbook_hooks 'name' => 'default_document', 'help' => lang('If you specify a document (full vfs path) here, addressbook displays an extra document icon for each address. That icon allows to download the specified document with the contact data inserted.').' '. lang('The document can contain placeholder like $$n_fn$$, to be replaced with the contact data (%1full list of placeholder names%2).','','').' '. - lang('At the moment the following document-types are supported:').'*.rtf, *.txt', + lang('At the moment the following document-types are supported:'). implode(',',bo_merge::get_file_extensions()), 'run_lang' => false, 'xmlrpc' => True, 'admin' => False, @@ -278,7 +278,7 @@ class addressbook_hooks 'name' => 'document_dir', 'help' => lang('If you specify a directory (full vfs path) here, addressbook displays an action for each document. That action allows to download the specified document with the contact data inserted.').' '. lang('The document can contain placeholder like $$n_fn$$, to be replaced with the contact data (%1full list of placeholder names%2).','','').' '. - lang('At the moment the following document-types are supported:').'*.rtf, *.txt', + lang('At the moment the following document-types are supported:'). implode(',',bo_merge::get_file_extensions()), 'run_lang' => false, 'xmlrpc' => True, 'admin' => False, diff --git a/etemplate/inc/class.bo_merge.inc.php b/etemplate/inc/class.bo_merge.inc.php index 1709e86b50..c64ded1059 100644 --- a/etemplate/inc/class.bo_merge.inc.php +++ b/etemplate/inc/class.bo_merge.inc.php @@ -690,4 +690,11 @@ abstract class bo_merge } common::egw_exit(); } + + /** + * Get a list of supported extentions + */ + public static function get_file_extensions() { + return array('txt', 'rtf', 'odt', 'ods', 'docx', 'xml'); + } }