diff --git a/timesheet/inc/class.export_openoffice.inc.php b/timesheet/inc/class.export_openoffice.inc.php index b5521bd835..84204696a3 100644 --- a/timesheet/inc/class.export_openoffice.inc.php +++ b/timesheet/inc/class.export_openoffice.inc.php @@ -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 ) { } diff --git a/timesheet/inc/class.egw_timesheet_record.inc.php b/timesheet/inc/class.timesheet_egw_record.inc.php similarity index 95% rename from timesheet/inc/class.egw_timesheet_record.inc.php rename to timesheet/inc/class.timesheet_egw_record.inc.php index c5a4c5be8c..65751b141e 100644 --- a/timesheet/inc/class.egw_timesheet_record.inc.php +++ b/timesheet/inc/class.timesheet_egw_record.inc.php @@ -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 = ''; diff --git a/timesheet/inc/class.export_timesheet_csv.inc.php b/timesheet/inc/class.timesheet_export_csv.inc.php similarity index 68% rename from timesheet/inc/class.export_timesheet_csv.inc.php rename to timesheet/inc/class.timesheet_export_csv.inc.php index e3891ac9d5..2dd167d2ce 100644 --- a/timesheet/inc/class.export_timesheet_csv.inc.php +++ b/timesheet/inc/class.timesheet_export_csv.inc.php @@ -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 'Selectors:'; } -} \ No newline at end of file +} diff --git a/timesheet/inc/class.export_timesheet_openoffice.inc.php b/timesheet/inc/class.timesheet_export_openoffice.inc.php similarity index 94% rename from timesheet/inc/class.export_timesheet_openoffice.inc.php rename to timesheet/inc/class.timesheet_export_openoffice.inc.php index 340f7c161e..72fcb9e38f 100644 --- a/timesheet/inc/class.export_timesheet_openoffice.inc.php +++ b/timesheet/inc/class.timesheet_export_openoffice.inc.php @@ -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 'Selectors:'; } }