forked from extern/egroupware
Import/Export - change signature of method that gets options to allow definition-specific values
This commit is contained in:
parent
edceca0295
commit
57821d6084
@ -286,6 +286,13 @@ class addressbook_import_contacts_csv extends importexport_basic_import_csv {
|
|||||||
*/
|
*/
|
||||||
protected function action ( $_action, importexport_iface_egw_record &$record, $record_num = 0 ) {
|
protected function action ( $_action, importexport_iface_egw_record &$record, $record_num = 0 ) {
|
||||||
$_data = $record->get_record_array();
|
$_data = $record->get_record_array();
|
||||||
|
|
||||||
|
// Make sure picture is loaded/updated
|
||||||
|
if($_data['jpegphoto'])
|
||||||
|
{
|
||||||
|
$_data['photo_unchanged'] = false;
|
||||||
|
}
|
||||||
|
|
||||||
switch ($_action) {
|
switch ($_action) {
|
||||||
case 'none' :
|
case 'none' :
|
||||||
return true;
|
return true;
|
||||||
@ -439,7 +446,8 @@ class addressbook_import_contacts_csv extends importexport_basic_import_csv {
|
|||||||
* preserv => array,
|
* preserv => array,
|
||||||
* )
|
* )
|
||||||
*/
|
*/
|
||||||
public function get_options_etpl() {
|
public function get_options_etpl(importexport_definition &$definition=null)
|
||||||
|
{
|
||||||
// lets do it!
|
// lets do it!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,8 @@ class addressbook_import_vcard implements importexport_iface_import_plugin {
|
|||||||
|
|
||||||
private static $plugin_options = array(
|
private static $plugin_options = array(
|
||||||
|
|
||||||
'contact_owner'
|
'contact_owner',
|
||||||
|
'charset'
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -342,12 +343,15 @@ class addressbook_import_vcard implements importexport_iface_import_plugin {
|
|||||||
* preserv => array,
|
* 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(
|
return array(
|
||||||
'name' => 'addressbook.import_vcard',
|
'name' => 'addressbook.import_vcard',
|
||||||
'content' => array(
|
'content' => array(
|
||||||
'file_type' => 'vcard,ical,vcf',
|
'file_type' => 'vcard,ical,vcf',
|
||||||
'charset' => $GLOBALS['egw_info']['user']['preferences']['addressbook']['vcard_charset']
|
'charset' => $charset
|
||||||
),
|
),
|
||||||
'sel_options' => array(
|
'sel_options' => array(
|
||||||
'charset' => Api\Translation::get_installed_charsets()
|
'charset' => Api\Translation::get_installed_charsets()
|
||||||
|
@ -248,7 +248,8 @@ class admin_import_groups_csv implements importexport_iface_import_plugin {
|
|||||||
* preserv => array,
|
* preserv => array,
|
||||||
* )
|
* )
|
||||||
*/
|
*/
|
||||||
public function get_options_etpl() {
|
public function get_options_etpl(importexport_definition &$definition=null)
|
||||||
|
{
|
||||||
// lets do it!
|
// lets do it!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -260,7 +260,8 @@ class admin_import_users_csv implements importexport_iface_import_plugin {
|
|||||||
* preserv => array,
|
* preserv => array,
|
||||||
* )
|
* )
|
||||||
*/
|
*/
|
||||||
public function get_options_etpl() {
|
public function get_options_etpl(importexport_definition &$definition=null)
|
||||||
|
{
|
||||||
// lets do it!
|
// lets do it!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,7 +278,8 @@ class calendar_import_ical implements importexport_iface_import_plugin {
|
|||||||
* preserv => array,
|
* preserv => array,
|
||||||
* )
|
* )
|
||||||
*/
|
*/
|
||||||
public function get_options_etpl() {
|
public function get_options_etpl(importexport_definition &$definition=null)
|
||||||
|
{
|
||||||
return array(
|
return array(
|
||||||
'name' => 'addressbook.import_vcard',
|
'name' => 'addressbook.import_vcard',
|
||||||
'content' => array(
|
'content' => array(
|
||||||
|
@ -624,7 +624,8 @@ error_log("Searching for $custom_field = $value");
|
|||||||
* preserv => array,
|
* preserv => array,
|
||||||
* )
|
* )
|
||||||
*/
|
*/
|
||||||
public function get_options_etpl() {
|
public function get_options_etpl(importexport_definition &$definition=null)
|
||||||
|
{
|
||||||
// lets do it!
|
// lets do it!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,6 +77,8 @@ interface importexport_iface_export_plugin {
|
|||||||
* @abstract We can't deal with etemplate objects here, as an uietemplate
|
* @abstract We can't deal with etemplate objects here, as an uietemplate
|
||||||
* objects itself are scipt orientated and not "dialog objects"
|
* objects itself are scipt orientated and not "dialog objects"
|
||||||
*
|
*
|
||||||
|
* @param $definition Specific definition
|
||||||
|
*
|
||||||
* @return array (
|
* @return array (
|
||||||
* name => string,
|
* name => string,
|
||||||
* content => array,
|
* content => array,
|
||||||
@ -85,7 +87,7 @@ interface importexport_iface_export_plugin {
|
|||||||
* preserv => array,
|
* preserv => array,
|
||||||
* )
|
* )
|
||||||
*/
|
*/
|
||||||
public function get_options_etpl();
|
public function get_options_etpl(importexport_definition &$definition=null);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns etemplate name for slectors of this plugin
|
* returns etemplate name for slectors of this plugin
|
||||||
|
@ -71,6 +71,7 @@ interface importexport_iface_import_plugin {
|
|||||||
* @abstract We can't deal with etemplate objects here, as an uietemplate
|
* @abstract We can't deal with etemplate objects here, as an uietemplate
|
||||||
* objects itself are scipt orientated and not "dialog objects"
|
* objects itself are scipt orientated and not "dialog objects"
|
||||||
*
|
*
|
||||||
|
* @param $definition Specific definition
|
||||||
* @return array (
|
* @return array (
|
||||||
* name => string,
|
* name => string,
|
||||||
* content => array,
|
* content => array,
|
||||||
@ -78,7 +79,7 @@ interface importexport_iface_import_plugin {
|
|||||||
* preserv => array,
|
* preserv => array,
|
||||||
* )
|
* )
|
||||||
*/
|
*/
|
||||||
public function get_options_etpl();
|
public function get_options_etpl(importexport_definition &$definition=null);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns etemplate name for slectors of this plugin
|
* returns etemplate name for slectors of this plugin
|
||||||
|
@ -147,7 +147,8 @@ class infolog_import_ical implements importexport_iface_import_plugin {
|
|||||||
* preserv => array,
|
* preserv => array,
|
||||||
* )
|
* )
|
||||||
*/
|
*/
|
||||||
public function get_options_etpl() {
|
public function get_options_etpl(importexport_definition &$definition=null)
|
||||||
|
{
|
||||||
// lets do it!
|
// lets do it!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -472,7 +472,8 @@ class infolog_import_infologs_csv implements importexport_iface_import_plugin
|
|||||||
* preserv => array,
|
* preserv => array,
|
||||||
* )
|
* )
|
||||||
*/
|
*/
|
||||||
public function get_options_etpl() {
|
public function get_options_etpl(importexport_definition &$definition=null)
|
||||||
|
{
|
||||||
// lets do it!
|
// lets do it!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -236,7 +236,8 @@ class resources_import_csv extends importexport_basic_import_csv {
|
|||||||
* preserv => array,
|
* preserv => array,
|
||||||
* )
|
* )
|
||||||
*/
|
*/
|
||||||
public function get_options_etpl() {
|
public function get_options_etpl(importexport_definition &$definition=null)
|
||||||
|
{
|
||||||
// lets do it!
|
// lets do it!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -515,7 +515,7 @@ class timesheet_import_csv implements importexport_iface_import_plugin
|
|||||||
* preserv => array,
|
* preserv => array,
|
||||||
* )
|
* )
|
||||||
*/
|
*/
|
||||||
public function get_options_etpl()
|
public function get_options_etpl(importexport_definition &$definition=null)
|
||||||
{
|
{
|
||||||
// lets do it!
|
// lets do it!
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user