mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
- Update importexport names/classes to reflect changes in importexport
This commit is contained in:
parent
6de19f924e
commit
1d4190276c
@ -10,9 +10,6 @@
|
||||
* @version $Id: $
|
||||
*/
|
||||
|
||||
require_once(EGW_INCLUDE_ROOT. '/importexport/inc/class.iface_export_record.inc.php');
|
||||
require_once(EGW_INCLUDE_ROOT. '/importexport/inc/class.import_export_helper_functions.inc.php');
|
||||
require_once(EGW_INCLUDE_ROOT. '/importexport/inc/class.iface_egw_record.inc.php');
|
||||
require_once(EGW_INCLUDE_ROOT. '/timesheet/inc/class.spreadsheet.inc.php');
|
||||
|
||||
/**
|
||||
@ -22,7 +19,7 @@ require_once(EGW_INCLUDE_ROOT. '/timesheet/inc/class.spreadsheet.inc.php');
|
||||
* adapter to spreadsheet class
|
||||
*
|
||||
*/
|
||||
class export_openoffice implements iface_export_record
|
||||
class export_openoffice implements importexport_iface_export_record
|
||||
{
|
||||
|
||||
/**
|
||||
@ -83,7 +80,7 @@ class export_openoffice implements iface_export_record
|
||||
* @return bool
|
||||
* @access public
|
||||
*/
|
||||
public function __construct( $_handle, $_charset, array $_options=array() ) {
|
||||
public function __construct( $_handle, array $_options ) {
|
||||
$this->handle = $_handle;
|
||||
}
|
||||
|
||||
@ -113,7 +110,7 @@ class export_openoffice implements iface_export_record
|
||||
* @return bool
|
||||
* @access public
|
||||
*/
|
||||
public function export_record( iface_egw_record $_record ) {
|
||||
public function export_record( importexport_iface_egw_record $_record ) {
|
||||
|
||||
}
|
||||
|
||||
|
@ -11,13 +11,11 @@
|
||||
* @version $Id: class.egw_addressbook_record.inc.php 22827 2006-11-10 15:35:35Z nelius_weiss $
|
||||
*/
|
||||
|
||||
require_once(EGW_INCLUDE_ROOT. '/importexport/inc/class.iface_egw_record.inc.php');
|
||||
|
||||
/**
|
||||
* class egw_addressbook_record
|
||||
* compability layer for iface_egw_record needet for importexport
|
||||
*/
|
||||
class egw_timesheet_record implements iface_egw_record
|
||||
class timesheet_egw_record implements importexport_iface_egw_record
|
||||
{
|
||||
|
||||
private $identifier = '';
|
@ -11,26 +11,20 @@
|
||||
* @version $Id: $
|
||||
*/
|
||||
|
||||
require_once(EGW_INCLUDE_ROOT. '/etemplate/inc/class.etemplate.inc.php');
|
||||
require_once(EGW_INCLUDE_ROOT. '/importexport/inc/class.export_csv.inc.php');
|
||||
require_once(EGW_INCLUDE_ROOT. '/importexport/inc/class.iface_export_plugin.inc.php');
|
||||
require_once(EGW_INCLUDE_ROOT. '/timesheet/inc/class.egw_timesheet_record.inc.php');
|
||||
require_once(EGW_INCLUDE_ROOT. '/timesheet/inc/class.uitimesheet.inc.php');
|
||||
|
||||
/**
|
||||
* export plugin of addressbook
|
||||
*/
|
||||
class export_timesheet_csv implements iface_export_plugin {
|
||||
class timesheet_export_csv implements importexport_iface_export_plugin {
|
||||
|
||||
/**
|
||||
* Exports records as defined in $_definition
|
||||
*
|
||||
* @param egw_record $_definition
|
||||
*/
|
||||
public static function export( $_stream, $_charset, definition $_definition) {
|
||||
$options = $_definition->options;
|
||||
public function export( $_stream, importexport_definition $_definition) {
|
||||
$options = $_definition->plugin_options;
|
||||
|
||||
$uitimesheet = new uitimesheet();
|
||||
$uitimesheet = new timesheet_ui();
|
||||
$selection = array();
|
||||
|
||||
$query = $GLOBALS['egw']->session->appsession('index',TIMESHEET_APP);
|
||||
@ -39,12 +33,12 @@ class export_timesheet_csv implements iface_export_plugin {
|
||||
$uitimesheet->get_rows($query,$selection,$readonlys,true); // true = only return the id's
|
||||
|
||||
$options['begin_with_fieldnames'] = true;
|
||||
$export_object = new export_csv($_stream, $charset, (array)$options);
|
||||
$export_object = new importexport_export_csv($_stream, (array)$options);
|
||||
|
||||
// $options['selection'] is array of identifiers as this plugin doesn't
|
||||
// support other selectors atm.
|
||||
foreach ($selection as $identifier) {
|
||||
$timesheetentry = new egw_timesheet_record($identifier);
|
||||
$timesheetentry = new timesheet_egw_record($identifier);
|
||||
$export_object->export_record($timesheetentry);
|
||||
unset($timesheetentry);
|
||||
}
|
||||
@ -83,7 +77,7 @@ class export_timesheet_csv implements iface_export_plugin {
|
||||
*
|
||||
* @return string html
|
||||
*/
|
||||
public static function get_options_etpl() {
|
||||
public function get_options_etpl() {
|
||||
return 'timesheet.export_csv_options';
|
||||
}
|
||||
|
||||
@ -91,7 +85,7 @@ class export_timesheet_csv implements iface_export_plugin {
|
||||
* returns slectors of this plugin via xajax
|
||||
*
|
||||
*/
|
||||
public static function get_selectors_etpl() {
|
||||
public function get_selectors_etpl() {
|
||||
return '<b>Selectors:</b>';
|
||||
}
|
||||
}
|
||||
}
|
@ -11,12 +11,10 @@
|
||||
* @version $Id: $
|
||||
*/
|
||||
|
||||
require_once(EGW_INCLUDE_ROOT. '/importexport/inc/class.iface_export_plugin.inc.php');
|
||||
|
||||
/**
|
||||
* export plugin of addressbook
|
||||
*/
|
||||
class export_timesheet_openoffice implements iface_export_plugin {
|
||||
class timesheet_export_openoffice implements importexport_iface_export_plugin {
|
||||
|
||||
|
||||
|
||||
@ -25,7 +23,7 @@ class export_timesheet_openoffice implements iface_export_plugin {
|
||||
*
|
||||
* @param egw_record $_definition
|
||||
*/
|
||||
public static function export( $_stream, $_charset, definition $_definition) {
|
||||
public function export( $_stream, importexport_definition $_definition) {
|
||||
|
||||
$options = $_definition->options;
|
||||
|
||||
@ -186,7 +184,7 @@ class export_timesheet_openoffice implements iface_export_plugin {
|
||||
*
|
||||
* @return string html
|
||||
*/
|
||||
public static function get_options_etpl() {
|
||||
public function get_options_etpl() {
|
||||
return 'timesheet.export_openoffice_options';
|
||||
}
|
||||
|
||||
@ -194,7 +192,7 @@ class export_timesheet_openoffice implements iface_export_plugin {
|
||||
* returns slectors of this plugin via xajax
|
||||
*
|
||||
*/
|
||||
public static function get_selectors_etpl() {
|
||||
public function get_selectors_etpl() {
|
||||
return '<b>Selectors:</b>';
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user