From e599013582917559a682b99aba16b47e5efba4c8 Mon Sep 17 00:00:00 2001 From: Sebijk Date: Thu, 2 Feb 2023 19:53:15 +0100 Subject: [PATCH] add FileHandlerMobile This allow to use plugins in mobile interface --- src/m/calendar.php | 7 +++++++ src/m/contacts.php | 7 +++++++ src/m/email.php | 7 +++++++ src/m/index.php | 7 +++++++ src/m/tasks.php | 7 +++++++ src/m/webdisk.php | 7 +++++++ src/serverlib/plugin.class.php | 7 +++++++ 7 files changed, 49 insertions(+) diff --git a/src/m/calendar.php b/src/m/calendar.php index 30ac569..bbe4473 100644 --- a/src/m/calendar.php +++ b/src/m/calendar.php @@ -26,6 +26,13 @@ if(!class_exists('BMAddressbook')) include('../serverlib/addressbook.class.php'); RequestPrivileges(PRIVILEGES_USER | PRIVILEGES_MOBILE); +/** + * file handler for modules + */ +ModuleFunction('FileHandlerMobile', + array(substr(__FILE__, strlen(__DIR__)+1), + isset($_REQUEST['action']) ? $_REQUEST['action'] : '')); + /** * calendar interface */ diff --git a/src/m/contacts.php b/src/m/contacts.php index 8b91a3d..2b6e42a 100644 --- a/src/m/contacts.php +++ b/src/m/contacts.php @@ -24,6 +24,13 @@ if(!class_exists('BMAddressbook')) include('../serverlib/addressbook.class.php'); RequestPrivileges(PRIVILEGES_USER | PRIVILEGES_MOBILE); +/** + * file handler for modules + */ +ModuleFunction('FileHandlerMobile', + array(substr(__FILE__, strlen(__DIR__)+1), + isset($_REQUEST['action']) ? $_REQUEST['action'] : '')); + /** * addressbook interface */ diff --git a/src/m/email.php b/src/m/email.php index ff27fb9..44618a7 100644 --- a/src/m/email.php +++ b/src/m/email.php @@ -26,6 +26,13 @@ if(!class_exists('BMMailBuilder')) include('../serverlib/mailbuilder.class.php'); RequestPrivileges(PRIVILEGES_USER | PRIVILEGES_MOBILE); +/** + * file handler for modules + */ +ModuleFunction('FileHandlerMobile', + array(substr(__FILE__, strlen(__DIR__)+1), + isset($_REQUEST['action']) ? $_REQUEST['action'] : '')); + /** * open mailbox */ diff --git a/src/m/index.php b/src/m/index.php index b604dae..3e1374f 100644 --- a/src/m/index.php +++ b/src/m/index.php @@ -21,6 +21,13 @@ include('../serverlib/init.inc.php'); +/** + * file handler for modules + */ +ModuleFunction('FileHandlerMobile', + array(substr(__FILE__, strlen(__DIR__)+1), + isset($_REQUEST['action']) ? $_REQUEST['action'] : '')); + /** * delete no redirect cookie, if exists */ diff --git a/src/m/tasks.php b/src/m/tasks.php index 9d9dd07..8f538c8 100644 --- a/src/m/tasks.php +++ b/src/m/tasks.php @@ -24,6 +24,13 @@ if(!class_exists('BMTodo')) include('../serverlib/todo.class.php'); RequestPrivileges(PRIVILEGES_USER | PRIVILEGES_MOBILE); +/** + * file handler for modules + */ +ModuleFunction('FileHandlerMobile', + array(substr(__FILE__, strlen(__DIR__)+1), + isset($_REQUEST['action']) ? $_REQUEST['action'] : '')); + /** * todo interface */ diff --git a/src/m/webdisk.php b/src/m/webdisk.php index 03b190f..0621140 100644 --- a/src/m/webdisk.php +++ b/src/m/webdisk.php @@ -26,6 +26,13 @@ if(!class_exists('BMZIP')) include('../serverlib/zip.class.php'); RequestPrivileges(PRIVILEGES_USER | PRIVILEGES_MOBILE); +/** + * file handler for modules + */ +ModuleFunction('FileHandlerMobile', + array(substr(__FILE__, strlen(__DIR__)+1), + isset($_REQUEST['action']) ? $_REQUEST['action'] : '')); + /** * open webdisk */ diff --git a/src/serverlib/plugin.class.php b/src/serverlib/plugin.class.php index 2832cc6..f72a1b7 100644 --- a/src/serverlib/plugin.class.php +++ b/src/serverlib/plugin.class.php @@ -400,6 +400,13 @@ class BMPlugin { } + /** + * user page handler for mobile interface. + */ + public function FileHandlerMobile($file, $action) + { + } + /** * admin page handler. */