diff --git a/inc/inc.Authentication.php b/inc/inc.Authentication.php index f212fe90e..5c1134dd6 100644 --- a/inc/inc.Authentication.php +++ b/inc/inc.Authentication.php @@ -98,7 +98,7 @@ $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); + $notificationObj->preAddService($notifier); } } } @@ -110,7 +110,7 @@ if($settings->_enableEmail) { if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) { foreach($GLOBALS['SEEDDMS_HOOKS']['notification'] as $notificationObj) { if(method_exists($notificationObj, 'postAddService')) { - $notificationObj->postAddService($dms, $settings, $notifier); + $notificationObj->postAddService($notifier); } } } diff --git a/inc/inc.ClassEmailNotify.php b/inc/inc.ClassEmailNotify.php index 70f1e802e..5ce8ac65b 100644 --- a/inc/inc.ClassEmailNotify.php +++ b/inc/inc.ClassEmailNotify.php @@ -69,21 +69,13 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify { * @return false or -1 in case of error, otherwise true */ function toIndividual($sender, $recipient, $subject, $message, $params=array()) { /* {{{ */ - global $settings; if ($recipient->isDisabled() || $recipient->getEmail()=="") return 0; - if(!is_object($recipient) && strcasecmp(get_class($recipient), "SeedDMS_Core_User")) { + if(!is_object($recipient) || strcasecmp(get_class($recipient), $this->_dms->getClassname('user'))) { return -1; } - if (is_object($sender) && !strcasecmp(get_class($sender), "SeedDMS_Core_User")) { - $from = $sender->getFullName() ." <". $sender->getEmail() .">"; - } elseif(is_string($sender) && trim($sender) != "") { - $from = $sender; - } else - return -1; - - if(is_object($sender) && strcasecmp(get_class($sender), "SeedDMS_Core_User")) { + if(is_object($sender) && !strcasecmp(get_class($sender), $this->_dms->getClassname('user'))) { $from = $sender->getFullName() ." <". $sender->getEmail() .">"; } elseif(is_string($sender) && trim($sender) != "") { $from = $sender; @@ -129,8 +121,8 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify { } /* }}} */ function toGroup($sender, $groupRecipient, $subject, $message, $params=array()) { /* {{{ */ - if ((!is_object($sender) && strcasecmp(get_class($sender), "SeedDMS_Core_User")) || - (!is_object($groupRecipient) && strcasecmp(get_class($groupRecipient), "SeedDMS_Core_Group"))) { + if ((!is_object($sender) && strcasecmp(get_class($sender), $this->_dms->getClassname('user'))) || + (!is_object($groupRecipient) || strcasecmp(get_class($groupRecipient), $this->_dms->getClassname('group')))) { return -1; } @@ -142,7 +134,7 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify { } /* }}} */ function toList($sender, $recipients, $subject, $message, $params=array()) { /* {{{ */ - if ((!is_object($sender) && strcasecmp(get_class($sender), "SeedDMS_Core_User")) || + if ((!is_object($sender) && strcasecmp(get_class($sender), $this->_dms->getClassname('user'))) || (!is_array($recipients) && count($recipients)==0)) { return -1; } diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 7eb6d4cb4..0c0a3da42 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -330,9 +330,19 @@ $(document).ready(function () { echo " ".($this->params['session']->getSu() ? getMLText("switched_to") : getMLText("signed_in_as"))." '".htmlspecialchars($this->params['user']->getFullName())."' \n"; echo "