mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[ticket/17135] Refactor messenger code to services [ci skip]
PHPBB3-17135
This commit is contained in:
@@ -132,6 +132,38 @@ class base
|
||||
$this->subject = $subject;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds antiabuse headers
|
||||
*
|
||||
* @param \phpbb\config\config $config Config object
|
||||
* @param \phpbb\user $user User object
|
||||
* @return void
|
||||
*/
|
||||
public function anti_abuse_headers($config, $user)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up extra headers
|
||||
*
|
||||
* @param string $header_name Email header name
|
||||
* @param string $header_value Email header body
|
||||
* @return void
|
||||
*/
|
||||
public function header($header_name, $header_value)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the reply to address
|
||||
*
|
||||
* @param string $address Email "Reply to" address
|
||||
* @return void
|
||||
*/
|
||||
public function replyto($address)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Set email template to use
|
||||
*
|
||||
@@ -232,7 +264,6 @@ class base
|
||||
public function assign_vars($vars)
|
||||
{
|
||||
$this->setup_template();
|
||||
|
||||
$this->template->assign_vars($vars);
|
||||
}
|
||||
|
||||
@@ -352,13 +383,15 @@ class base
|
||||
*/
|
||||
public function save_queue()
|
||||
{
|
||||
$this->queue->save();
|
||||
return;
|
||||
if ($this->use_queue && !empty($this->queue))
|
||||
{
|
||||
$this->queue->save();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup template engine
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function setup_template()
|
||||
@@ -402,7 +435,6 @@ class base
|
||||
protected function set_template_paths($path_name, $paths)
|
||||
{
|
||||
$this->setup_template();
|
||||
|
||||
$this->template->set_custom_style($path_name, $paths);
|
||||
}
|
||||
}
|
||||
|
@@ -82,6 +82,16 @@ class email extends base
|
||||
/** @var Symfony\Component\Mailer\Transport */
|
||||
protected $transport;
|
||||
|
||||
/**
|
||||
* Get messenger method id
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function get_id()
|
||||
{
|
||||
return NOTIFY_EMAIL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the messenger method is enabled
|
||||
* @return void
|
||||
@@ -286,19 +296,6 @@ class email extends base
|
||||
parent::error($type, $msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save message data to the messenger file queue
|
||||
* @return void
|
||||
*/
|
||||
public function save_queue()
|
||||
{
|
||||
if ($this->config['email_package_size'] && $this->use_queue && !empty($this->queue))
|
||||
{
|
||||
$this->queue->save();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Detect proper Header class method to add header
|
||||
*
|
||||
|
@@ -110,6 +110,16 @@ class jabber extends base
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get messenger method id
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function get_id()
|
||||
{
|
||||
return NOTIFY_IM;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the messenger method is enabled
|
||||
* @return void
|
||||
|
Reference in New Issue
Block a user