mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/11628] Make get_template_vars protected
Remove all references to it and the hacky code in messenger that was using it PHPBB3-11628
This commit is contained in:
parent
427fa17f7f
commit
ffbc144a73
2 changed files with 8 additions and 25 deletions
|
@ -21,7 +21,7 @@ if (!defined('IN_PHPBB'))
|
||||||
*/
|
*/
|
||||||
class messenger
|
class messenger
|
||||||
{
|
{
|
||||||
var $vars, $msg, $extra_headers, $replyto, $from, $subject;
|
var $msg, $extra_headers, $replyto, $from, $subject;
|
||||||
var $addresses = array();
|
var $addresses = array();
|
||||||
|
|
||||||
var $mail_priority = MAIL_NORMAL_PRIORITY;
|
var $mail_priority = MAIL_NORMAL_PRIORITY;
|
||||||
|
@ -53,7 +53,7 @@ class messenger
|
||||||
function reset()
|
function reset()
|
||||||
{
|
{
|
||||||
$this->addresses = $this->extra_headers = array();
|
$this->addresses = $this->extra_headers = array();
|
||||||
$this->vars = $this->msg = $this->replyto = $this->from = '';
|
$this->msg = $this->replyto = $this->from = '';
|
||||||
$this->mail_priority = MAIL_NORMAL_PRIORITY;
|
$this->mail_priority = MAIL_NORMAL_PRIORITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -258,8 +258,6 @@ class messenger
|
||||||
'body' => $template_file . '.txt',
|
'body' => $template_file . '.txt',
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->vars = $this->template->get_template_vars();
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -288,26 +286,11 @@ class messenger
|
||||||
global $config, $user;
|
global $config, $user;
|
||||||
|
|
||||||
// We add some standard variables we always use, no need to specify them always
|
// We add some standard variables we always use, no need to specify them always
|
||||||
if (!isset($this->vars['U_BOARD']))
|
|
||||||
{
|
|
||||||
$this->assign_vars(array(
|
$this->assign_vars(array(
|
||||||
'U_BOARD' => generate_board_url(),
|
'U_BOARD' => generate_board_url(),
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($this->vars['EMAIL_SIG']))
|
|
||||||
{
|
|
||||||
$this->assign_vars(array(
|
|
||||||
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . htmlspecialchars_decode($config['board_email_sig'])),
|
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . htmlspecialchars_decode($config['board_email_sig'])),
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($this->vars['SITENAME']))
|
|
||||||
{
|
|
||||||
$this->assign_vars(array(
|
|
||||||
'SITENAME' => htmlspecialchars_decode($config['sitename']),
|
'SITENAME' => htmlspecialchars_decode($config['sitename']),
|
||||||
));
|
));
|
||||||
}
|
|
||||||
|
|
||||||
// Parse message through template
|
// Parse message through template
|
||||||
$this->msg = trim($this->template->assign_display('body'));
|
$this->msg = trim($this->template->assign_display('body'));
|
||||||
|
|
|
@ -464,7 +464,7 @@ class phpbb_template_twig implements phpbb_template
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function get_template_vars()
|
protected function get_template_vars()
|
||||||
{
|
{
|
||||||
$context_vars = $this->context->get_data_ref();
|
$context_vars = $this->context->get_data_ref();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue