backported r33878, r33880 from Nathan to display supported fileformats in addressbook prefs

This commit is contained in:
Ralf Becker 2011-08-26 10:09:23 +00:00
parent d6574654c1
commit a13283e39d
2 changed files with 9 additions and 2 deletions

View File

@ -258,7 +258,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).','<a href="'.$link.'" target="_blank">','</a>').' '.
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,
@ -270,7 +270,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).','<a href="'.$link.'" target="_blank">','</a>').' '.
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,

View File

@ -734,4 +734,11 @@ abstract class bo_merge
}
return etemplate::number_format($number,$num_decimal_places);
}
/**
* Get a list of supported extentions
*/
public static function get_file_extensions() {
return array('txt', 'rtf', 'odt', 'ods', 'docx', 'xml');
}
}