call notification hooks before and after setting up email notification

This commit is contained in:
Uwe Steinmann 2017-11-21 08:41:10 +01:00
parent cc6f64a1a3
commit 64f7e9be10

View File

@ -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;