call hooks before and after setting notification service

This commit is contained in:
Uwe Steinmann 2016-03-09 18:25:17 +01:00
parent 197a005da6
commit 6132c364de

View File

@ -91,11 +91,30 @@ $theme = $resArr["theme"];
$lang = $resArr["language"];
$dms->setUser($user);
$notifier = new SeedDMS_NotificationService();
if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) {
foreach($GLOBALS['SEEDDMS_HOOKS']['notification'] as $notificationObj) {
if(method_exists($notificationObj, 'preAddService')) {
$notificationObj->postAddService($dms, $settings, $notifier);
}
}
}
if($settings->_enableEmail) {
$notifier->addService(new SeedDMS_EmailNotify($dms, $settings->_smtpSendFrom, $settings->_smtpServer, $settings->_smtpPort, $settings->_smtpUser, $settings->_smtpPassword));
}
if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) {
foreach($GLOBALS['SEEDDMS_HOOKS']['notification'] as $notificationObj) {
if(method_exists($notificationObj, 'postAddService')) {
$notificationObj->postAddService($dms, $settings, $notifier);
}
}
}
/* Include the language file as specified in the session. If that is not
* available use the language from the settings
*/