[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:
Nathaniel Guse 2013-07-24 13:38:12 -05:00
parent 427fa17f7f
commit ffbc144a73
2 changed files with 8 additions and 25 deletions

View file

@ -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'));

View file

@ -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();