mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 20:51:30 +00:00
move set sender into EmailNotify
This commit is contained in:
parent
f021f1e2fd
commit
401f3ba685
|
@ -30,6 +30,15 @@ require_once("inc.ClassNotify.php");
|
||||||
* @version Release: @package_version@
|
* @version Release: @package_version@
|
||||||
*/
|
*/
|
||||||
class SeedDMS_EmailNotify extends SeedDMS_Notify {
|
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()) { /* {{{ */
|
function toIndividual($sender, $recipient, $subject, $message, $params=array()) { /* {{{ */
|
||||||
global $settings;
|
global $settings;
|
||||||
|
|
|
@ -25,27 +25,9 @@
|
||||||
* @version Release: @package_version@
|
* @version Release: @package_version@
|
||||||
*/
|
*/
|
||||||
abstract class SeedDMS_Notify {
|
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 toIndividual($sender, $recipient, $subject, $message, $params=array());
|
||||||
abstract function toGroup($sender, $groupRecipient, $subject, $message, $params=array());
|
abstract function toGroup($sender, $groupRecipient, $subject, $message, $params=array());
|
||||||
abstract function toList($sender, $recipients, $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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user