mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-01 14:37:20 +00:00
do not intanciate Email class if emailing is turned off
checking if email is on was removed from Email class
This commit is contained in:
parent
b4ea1a922d
commit
5e87cb378d
|
@ -43,8 +43,12 @@ if (!is_object($user)) {
|
|||
}
|
||||
|
||||
$dms->setUser($user);
|
||||
$notifier = new SeedDMS_Email();
|
||||
$notifier->setSender($user);
|
||||
if($settings->_enableEmail) {
|
||||
$notifier = new SeedDMS_Email();
|
||||
$notifier->setSender($user);
|
||||
} else {
|
||||
$notifier = null;
|
||||
}
|
||||
|
||||
/* Include the language file as specified in the session. If that is not
|
||||
* available use the language from the settings
|
||||
|
|
|
@ -32,10 +32,6 @@ require_once("inc.ClassNotify.php");
|
|||
class SeedDMS_Email extends SeedDMS_Notify {
|
||||
|
||||
function toIndividual($sender, $recipient, $subject, $message, $params=array()) { /* {{{ */
|
||||
global $settings;
|
||||
|
||||
if ($settings->_enableEmail==FALSE) return 0;
|
||||
|
||||
if ($recipient->getEmail()=="") return 0;
|
||||
|
||||
if ((!is_object($sender) && strcasecmp(get_class($sender), "SeedDMS_Core_User")) ||
|
||||
|
@ -59,10 +55,6 @@ class SeedDMS_Email extends SeedDMS_Notify {
|
|||
} /* }}} */
|
||||
|
||||
function toGroup($sender, $groupRecipient, $subject, $message, $params=array()) { /* {{{ */
|
||||
|
||||
global $settings;
|
||||
if (!$settings->_enableEmail) return 0;
|
||||
|
||||
if ((!is_object($sender) && strcasecmp(get_class($sender), "SeedDMS_Core_User")) ||
|
||||
(!is_object($groupRecipient) && strcasecmp(get_class($groupRecipient), "SeedDMS_Core_Group"))) {
|
||||
return -1;
|
||||
|
@ -76,10 +68,6 @@ class SeedDMS_Email extends SeedDMS_Notify {
|
|||
} /* }}} */
|
||||
|
||||
function toList($sender, $recipients, $subject, $message, $params) { /* {{{ */
|
||||
global $settings;
|
||||
|
||||
if (!$settings->_enableEmail) return 0;
|
||||
|
||||
if ((!is_object($sender) && strcasecmp(get_class($sender), "SeedDMS_Core_User")) ||
|
||||
(!is_array($recipients) && count($recipients)==0)) {
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue
Block a user