mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 07:04:57 +00:00
call hooks before and after setting notification service
This commit is contained in:
parent
197a005da6
commit
6132c364de
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user