mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-02 19:39:39 +01:00
Change function signatures to match importexport r47281
This commit is contained in:
parent
52c9a86704
commit
98ff5bbce2
@ -129,11 +129,11 @@ class resources_import_csv extends importexport_basic_import_csv {
|
|||||||
if ( !is_array( $record->cat_id ) ) $record->cat_id = explode( ',', $record->cat_id );
|
if ( !is_array( $record->cat_id ) ) $record->cat_id = explode( ',', $record->cat_id );
|
||||||
$record->cat_id = implode( ',', array_unique( array_merge( $record->cat_id, $resource['cat_id'] ) ) );
|
$record->cat_id = implode( ',', array_unique( array_merge( $record->cat_id, $resource['cat_id'] ) ) );
|
||||||
}
|
}
|
||||||
$success = $this->action( $action['action'], $record->get_record_array(), $import_csv->get_current_position() );
|
$success = $this->action( $action['action'], $record, $import_csv->get_current_position() );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$action = $condition['false'];
|
$action = $condition['false'];
|
||||||
$success = ($this->action( $action['action'], $record->get_record_array(), $import_csv->get_current_position() ));
|
$success = ($this->action( $action['action'], $record, $import_csv->get_current_position() ));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -146,7 +146,7 @@ class resources_import_csv extends importexport_basic_import_csv {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// unconditional insert
|
// unconditional insert
|
||||||
$success = $this->action( 'insert', $record->get_record_array(), $import_csv->get_current_position() );
|
$success = $this->action( 'insert', $record, $import_csv->get_current_position() );
|
||||||
}
|
}
|
||||||
return $success;
|
return $success;
|
||||||
}
|
}
|
||||||
@ -155,10 +155,11 @@ class resources_import_csv extends importexport_basic_import_csv {
|
|||||||
* perform the required action
|
* perform the required action
|
||||||
*
|
*
|
||||||
* @param int $_action one of $this->actions
|
* @param int $_action one of $this->actions
|
||||||
* @param array $_data contact data for the action
|
* @param importexport_iface_egw_record $record Entry record
|
||||||
* @return bool success or not
|
* @return bool success or not
|
||||||
*/
|
*/
|
||||||
protected function action ( $_action, Array $_data, $record_num = 0 ) {
|
protected function action ( $_action, importexport_iface_egw_record &$record, $record_num = 0 ) {
|
||||||
|
$_data = $record->get_record_array();
|
||||||
switch ($_action) {
|
switch ($_action) {
|
||||||
case 'none' :
|
case 'none' :
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user