move set sender into EmailNotify

This commit is contained in:
Uwe Steinmann 2015-11-25 17:18:58 +01:00
parent f021f1e2fd
commit 401f3ba685
2 changed files with 9 additions and 18 deletions

View File

@ -30,6 +30,15 @@ require_once("inc.ClassNotify.php");
* @version Release: @package_version@
*/
class SeedDMS_EmailNotify extends SeedDMS_Notify {
/* User sending the notification
* Will only be used if the sender of one of the notify methods
* is not set
*/
protected $sender;
function setSender($user) {
$this->sender = $user;
}
function toIndividual($sender, $recipient, $subject, $message, $params=array()) { /* {{{ */
global $settings;

View File

@ -25,27 +25,9 @@
* @version Release: @package_version@
*/
abstract class SeedDMS_Notify {
/* User sending the notification
* Will only be used if the sender of one of the notify methods
* is not set
*/
protected $sender;
abstract function toIndividual($sender, $recipient, $subject, $message, $params=array());
abstract function toGroup($sender, $groupRecipient, $subject, $message, $params=array());
abstract function toList($sender, $recipients, $subject, $message, $params=array());
function replaceMarker($text) {
global $settings;
return(str_replace(
array('###SITENAME###', '###HTTP_ROOT###', '###URL_PREFIX###'),
array($settings->_siteName, $settings->_httpRoot, "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot),
$text));
}
function setSender($user) {
$this->sender = $user;
}
}
?>