diff --git a/addressbook/inc/class.addressbook_import_contacts_csv.inc.php b/addressbook/inc/class.addressbook_import_contacts_csv.inc.php index 4bb2db32c3..fe4d6a7592 100644 --- a/addressbook/inc/class.addressbook_import_contacts_csv.inc.php +++ b/addressbook/inc/class.addressbook_import_contacts_csv.inc.php @@ -292,7 +292,7 @@ class addressbook_import_contacts_csv extends importexport_basic_import_csv { { $_data['photo_unchanged'] = false; } - + switch ($_action) { case 'none' : return true; @@ -446,7 +446,8 @@ class addressbook_import_contacts_csv extends importexport_basic_import_csv { * preserv => array, * ) */ - public function get_options_etpl() { + public function get_options_etpl(importexport_definition &$definition=null) + { // lets do it! } diff --git a/addressbook/inc/class.addressbook_import_vcard.inc.php b/addressbook/inc/class.addressbook_import_vcard.inc.php index 4930b32df7..df7596b07c 100644 --- a/addressbook/inc/class.addressbook_import_vcard.inc.php +++ b/addressbook/inc/class.addressbook_import_vcard.inc.php @@ -19,7 +19,8 @@ class addressbook_import_vcard implements importexport_iface_import_plugin { private static $plugin_options = array( - 'contact_owner' + 'contact_owner', + 'charset' ); /** @@ -341,12 +342,15 @@ class addressbook_import_vcard implements importexport_iface_import_plugin { * preserv => array, * ) */ - public function get_options_etpl() { + public function get_options_etpl(importexport_definition &$definition=null) + { + $charset = $definition->plugin_options['charset']; + if($charset == 'user') $charset = $GLOBALS['egw_info']['user']['preferences']['addressbook']['vcard_charset']; return array( 'name' => 'addressbook.import_vcard', 'content' => array( 'file_type' => 'vcard,ical,vcf', - 'charset' => $GLOBALS['egw_info']['user']['preferences']['addressbook']['vcard_charset'] + 'charset' => $charset ), 'sel_options' => array( 'charset' => Api\Translation::get_installed_charsets() diff --git a/admin/inc/class.admin_import_groups_csv.inc.php b/admin/inc/class.admin_import_groups_csv.inc.php index feec2867a2..e098ee0900 100644 --- a/admin/inc/class.admin_import_groups_csv.inc.php +++ b/admin/inc/class.admin_import_groups_csv.inc.php @@ -248,7 +248,8 @@ class admin_import_groups_csv implements importexport_iface_import_plugin { * preserv => array, * ) */ - public function get_options_etpl() { + public function get_options_etpl(importexport_definition &$definition=null) + { // lets do it! } diff --git a/admin/inc/class.admin_import_users_csv.inc.php b/admin/inc/class.admin_import_users_csv.inc.php index c7401b6f6f..1bd81e8432 100644 --- a/admin/inc/class.admin_import_users_csv.inc.php +++ b/admin/inc/class.admin_import_users_csv.inc.php @@ -260,7 +260,8 @@ class admin_import_users_csv implements importexport_iface_import_plugin { * preserv => array, * ) */ - public function get_options_etpl() { + public function get_options_etpl(importexport_definition &$definition=null) + { // lets do it! } diff --git a/calendar/inc/class.calendar_import_ical.inc.php b/calendar/inc/class.calendar_import_ical.inc.php index c1fb2f8311..525106793a 100644 --- a/calendar/inc/class.calendar_import_ical.inc.php +++ b/calendar/inc/class.calendar_import_ical.inc.php @@ -278,7 +278,8 @@ class calendar_import_ical implements importexport_iface_import_plugin { * preserv => array, * ) */ - public function get_options_etpl() { + public function get_options_etpl(importexport_definition &$definition=null) + { return array( 'name' => 'addressbook.import_vcard', 'content' => array( diff --git a/importexport/inc/class.importexport_basic_import_csv.inc.php b/importexport/inc/class.importexport_basic_import_csv.inc.php index 3426586c83..430f56c8ed 100644 --- a/importexport/inc/class.importexport_basic_import_csv.inc.php +++ b/importexport/inc/class.importexport_basic_import_csv.inc.php @@ -624,7 +624,8 @@ error_log("Searching for $custom_field = $value"); * preserv => array, * ) */ - public function get_options_etpl() { + public function get_options_etpl(importexport_definition &$definition=null) + { // lets do it! } diff --git a/importexport/inc/class.importexport_iface_export_plugin.inc.php b/importexport/inc/class.importexport_iface_export_plugin.inc.php index 11a8476767..6fc6fb909d 100644 --- a/importexport/inc/class.importexport_iface_export_plugin.inc.php +++ b/importexport/inc/class.importexport_iface_export_plugin.inc.php @@ -35,7 +35,7 @@ * get_selector(); //returns array */ interface importexport_iface_export_plugin { - + /** * exports entries according to given definition object. * @@ -43,28 +43,28 @@ interface importexport_iface_export_plugin { * @param importexport_definition $_definition */ public function export($_stream, importexport_definition $_definition); - + /** * returns translated name of plugin * * @return string name */ public static function get_name(); - + /** * returns translated (user) description of plugin * * @return string descriprion */ public static function get_description(); - + /** * retruns file suffix for exported file (e.g. csv) * * @return string suffix */ public static function get_filesuffix(); - + /** * returns mime type for exported file * @@ -77,6 +77,8 @@ interface importexport_iface_export_plugin { * @abstract We can't deal with etemplate objects here, as an uietemplate * objects itself are scipt orientated and not "dialog objects" * + * @param $definition Specific definition + * * @return array ( * name => string, * content => array, @@ -85,8 +87,8 @@ interface importexport_iface_export_plugin { * preserv => array, * ) */ - public function get_options_etpl(); - + public function get_options_etpl(importexport_definition &$definition=null); + /** * returns etemplate name for slectors of this plugin * diff --git a/importexport/inc/class.importexport_iface_import_plugin.inc.php b/importexport/inc/class.importexport_iface_import_plugin.inc.php index 5a371e02a9..1b779ebe24 100644 --- a/importexport/inc/class.importexport_iface_import_plugin.inc.php +++ b/importexport/inc/class.importexport_iface_import_plugin.inc.php @@ -25,7 +25,7 @@ * has nothing to do with datatypes. */ interface importexport_iface_import_plugin { - + /** * imports entries according to given definition object. * @@ -44,33 +44,34 @@ interface importexport_iface_import_plugin { * @return String HTML preview */ // public function preview( $_stream, importexport_definition $_definition ); - + /** * returns translated name of plugin * * @return string name */ public static function get_name(); - + /** * returns translated (user) description of plugin * * @return string descriprion */ public static function get_description(); - + /** * retruns file suffix(s) plugin can handle (e.g. csv) * * @return string suffix (comma seperated) */ public static function get_filesuffix(); - + /** * return etemplate components for options. * @abstract We can't deal with etemplate objects here, as an uietemplate * objects itself are scipt orientated and not "dialog objects" * + * @param $definition Specific definition * @return array ( * name => string, * content => array, @@ -78,8 +79,8 @@ interface importexport_iface_import_plugin { * preserv => array, * ) */ - public function get_options_etpl(); - + public function get_options_etpl(importexport_definition &$definition=null); + /** * returns etemplate name for slectors of this plugin * diff --git a/infolog/inc/class.infolog_import_ical.inc.php b/infolog/inc/class.infolog_import_ical.inc.php index a2ddfa657b..404baf1721 100644 --- a/infolog/inc/class.infolog_import_ical.inc.php +++ b/infolog/inc/class.infolog_import_ical.inc.php @@ -147,7 +147,8 @@ class infolog_import_ical implements importexport_iface_import_plugin { * preserv => array, * ) */ - public function get_options_etpl() { + public function get_options_etpl(importexport_definition &$definition=null) + { // lets do it! } diff --git a/infolog/inc/class.infolog_import_infologs_csv.inc.php b/infolog/inc/class.infolog_import_infologs_csv.inc.php index 5f7ab5090b..d3515c5c95 100644 --- a/infolog/inc/class.infolog_import_infologs_csv.inc.php +++ b/infolog/inc/class.infolog_import_infologs_csv.inc.php @@ -472,7 +472,8 @@ class infolog_import_infologs_csv implements importexport_iface_import_plugin * preserv => array, * ) */ - public function get_options_etpl() { + public function get_options_etpl(importexport_definition &$definition=null) + { // lets do it! } diff --git a/resources/inc/class.resources_import_csv.inc.php b/resources/inc/class.resources_import_csv.inc.php index 1901600e1b..08276dea7d 100644 --- a/resources/inc/class.resources_import_csv.inc.php +++ b/resources/inc/class.resources_import_csv.inc.php @@ -236,7 +236,8 @@ class resources_import_csv extends importexport_basic_import_csv { * preserv => array, * ) */ - public function get_options_etpl() { + public function get_options_etpl(importexport_definition &$definition=null) + { // lets do it! } diff --git a/timesheet/inc/class.timesheet_import_csv.inc.php b/timesheet/inc/class.timesheet_import_csv.inc.php index 21c312076a..8d84b04027 100644 --- a/timesheet/inc/class.timesheet_import_csv.inc.php +++ b/timesheet/inc/class.timesheet_import_csv.inc.php @@ -422,7 +422,7 @@ class timesheet_import_csv implements importexport_iface_import_plugin if ($_data['pm_id']) { Link::link(TIMESHEET_APP,$_data['ts_id'],'projectmanager',$_data['pm_id']); - + // notify the link-class about the update, as other apps may be subscribed to it Link::notify_update(TIMESHEET_APP,$this->data['ts_id'],$this->data); } @@ -515,7 +515,7 @@ class timesheet_import_csv implements importexport_iface_import_plugin * preserv => array, * ) */ - public function get_options_etpl() + public function get_options_etpl(importexport_definition &$definition=null) { // lets do it! }