From 7746bdd5627f70e1be875570a07fff56892e0987 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Mon, 31 Oct 2016 23:01:52 +0100 Subject: [PATCH] Fixed import on Kopano Webapp 3.1.1 --- .idea/calendarimporter.iml | 10 - .idea/copyright/profiles_settings.xml | 3 + .idea/workspace.xml | 435 ++++++++++++++++++++++++++ Makefile | 2 + config.php | 2 +- js/plugin.calendarimporter.js | 4 +- php/module.calendar.php | 4 +- php/plugin.calendarimporter.php | 4 +- 8 files changed, 446 insertions(+), 18 deletions(-) create mode 100644 .idea/copyright/profiles_settings.xml create mode 100644 .idea/workspace.xml create mode 100644 Makefile diff --git a/.idea/calendarimporter.iml b/.idea/calendarimporter.iml index 0c76797..c956989 100644 --- a/.idea/calendarimporter.iml +++ b/.idea/calendarimporter.iml @@ -4,15 +4,5 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000..e7bedf3 --- /dev/null +++ b/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..27afebc --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,435 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + DEFINITION_ORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project + + + true + + + + DIRECTORY + + false + + + + + + + + + 1477949602474 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..fd5d35c --- /dev/null +++ b/Makefile @@ -0,0 +1,2 @@ +default: + ant deploy; cp -r /home/osboxes/Documents/kopano-webapp-3.2.0.285/deploy/plugins/calendarimporter /usr/share/kopano-webapp/plugins/ diff --git a/config.php b/config.php index 6796ccf..a1b8f1b 100644 --- a/config.php +++ b/config.php @@ -9,5 +9,5 @@ define('PLUGIN_CALENDARIMPORTER_DEFAULT_TIMEZONE', "Europe/Vienna"); /** Tempory path for uploaded files... */ - define('PLUGIN_CALENDARIMPORTER_TMP_UPLOAD', "/var/lib/zarafa-webapp/tmp/"); + define('PLUGIN_CALENDARIMPORTER_TMP_UPLOAD', "/var/lib/kopano-webapp/tmp/"); ?> diff --git a/js/plugin.calendarimporter.js b/js/plugin.calendarimporter.js index 4d634e7..bb4579d 100644 --- a/js/plugin.calendarimporter.js +++ b/js/plugin.calendarimporter.js @@ -95,7 +95,7 @@ Zarafa.plugins.calendarimporter.ImportPlugin = Ext.extend(Zarafa.core.Plugin, { recordIds.push(btn.records[i].get("entryid")); } - var responseHandler = new Zarafa.plugins.contactimporter.data.ResponseHandler({ + var responseHandler = new Zarafa.plugins.calendarimporter.data.ResponseHandler({ successCallback: Zarafa.plugins.calendarimporter.data.Actions.downloadICS, scope : this }); @@ -164,7 +164,7 @@ Zarafa.plugins.calendarimporter.ImportPlugin = Ext.extend(Zarafa.core.Plugin, { */ gotAttachmentFileName: function (response) { if (response.status == true) { - this.openImportDialog(response.tmpname); + this.scope.openImportDialog(response.tmpname); } else { Zarafa.common.dialogs.MessageBox.show({ title : _('Error'), diff --git a/php/module.calendar.php b/php/module.calendar.php index 1620295..ea1f07f 100644 --- a/php/module.calendar.php +++ b/php/module.calendar.php @@ -43,7 +43,7 @@ class CalendarModule extends Module */ public function __construct($id, $data) { - parent::Module($id, $data); + parent::__construct($id, $data); // init default timezone date_default_timezone_set(PLUGIN_CALENDARIMPORTER_DEFAULT_TIMEZONE); @@ -619,7 +619,7 @@ class CalendarModule extends Module $parser = VObject\Reader::read( fopen($actionData["ics_filepath"],'r') ); - error_log(print_r($parser->VTIMEZONE, true)); + //error_log(print_r($parser->VTIMEZONE, true)); } catch (Exception $e) { $error = true; $error_msg = $e->getMessage(); diff --git a/php/plugin.calendarimporter.php b/php/plugin.calendarimporter.php index 1b9d947..bd8aec5 100644 --- a/php/plugin.calendarimporter.php +++ b/php/plugin.calendarimporter.php @@ -33,9 +33,7 @@ class Plugincalendarimporter extends Plugin /** * Constructor */ - function Plugincalendarimporter() - { - } + function __construct() {} /** * Function initializes the Plugin and registers all hooks