From 64f7e9be10a2d57af2b82ef80befa78bf491c75b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 21 Nov 2017 08:41:10 +0100 Subject: [PATCH 1/3] call notification hooks before and after setting up email notification --- op/op.Ajax.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/op/op.Ajax.php b/op/op.Ajax.php index 404abb96a..61209da3c 100644 --- a/op/op.Ajax.php +++ b/op/op.Ajax.php @@ -60,9 +60,25 @@ if (isset($_COOKIE["mydms_session"])) { } } $notifier = new SeedDMS_NotificationService(); + if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) { + foreach($GLOBALS['SEEDDMS_HOOKS']['notification'] as $notificationObj) { + if(method_exists($notificationObj, 'preAddService')) { + $notificationObj->preAddService($notifier); + } + } + } + if($settings->_enableEmail) { $notifier->addService(new SeedDMS_EmailNotify($dms)); } + + if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) { + foreach($GLOBALS['SEEDDMS_HOOKS']['notification'] as $notificationObj) { + if(method_exists($notificationObj, 'postAddService')) { + $notificationObj->postAddService($notifier); + } + } + } include $settings->_rootDir . "languages/" . $resArr["language"] . "/lang.inc"; } else { $user = null; From 51228b5a8facf377eb4a8e162f4d2dcf62dd3555 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 21 Nov 2017 08:46:48 +0100 Subject: [PATCH 2/3] init index --- op/op.RemoveDocument.php | 1 + 1 file changed, 1 insertion(+) diff --git a/op/op.RemoveDocument.php b/op/op.RemoveDocument.php index 361c9ca17..afdcceb8b 100644 --- a/op/op.RemoveDocument.php +++ b/op/op.RemoveDocument.php @@ -59,6 +59,7 @@ if($document->isLocked()) { if($settings->_enableFullSearch) { $index = $indexconf['Indexer']::open($settings->_luceneDir); + $indexconf['Indexer']::init($settings->_stopWordsFile); } else { $index = null; } From 0421b2f0acaae5d54f0097a3c59f74cee819a432 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 21 Nov 2017 08:47:00 +0100 Subject: [PATCH 3/3] add fold marks --- op/op.Download.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/op/op.Download.php b/op/op.Download.php index 3d157a968..742c210c9 100644 --- a/op/op.Download.php +++ b/op/op.Download.php @@ -33,7 +33,7 @@ include("../inc/inc.Authentication.php"); $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $controller = Controller::factory($tmp[1]); -if (isset($_GET["version"])) { +if (isset($_GET["version"])) { /* {{{ */ // document download if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"])<1) { @@ -68,7 +68,8 @@ if (isset($_GET["version"])) { $controller->setParam('type', 'version'); $controller->run(); -} elseif (isset($_GET["file"])) { +} /* }}} */ +elseif (isset($_GET["file"])) { /* {{{ */ // file download