mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-11 00:15:34 +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"];
|
$lang = $resArr["language"];
|
||||||
|
|
||||||
$dms->setUser($user);
|
$dms->setUser($user);
|
||||||
|
|
||||||
$notifier = new SeedDMS_NotificationService();
|
$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) {
|
if($settings->_enableEmail) {
|
||||||
$notifier->addService(new SeedDMS_EmailNotify($dms, $settings->_smtpSendFrom, $settings->_smtpServer, $settings->_smtpPort, $settings->_smtpUser, $settings->_smtpPassword));
|
$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
|
/* Include the language file as specified in the session. If that is not
|
||||||
* available use the language from the settings
|
* available use the language from the settings
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user