1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 20:13:22 +01: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:
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
{
var $vars, $msg, $extra_headers, $replyto, $from, $subject;
var $msg, $extra_headers, $replyto, $from, $subject;
var $addresses = array();
var $mail_priority = MAIL_NORMAL_PRIORITY;
@ -53,7 +53,7 @@ class messenger
function reset()
{
$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;
}
@ -258,8 +258,6 @@ class messenger
'body' => $template_file . '.txt',
));
$this->vars = $this->template->get_template_vars();
return true;
}
@ -288,26 +286,11 @@ class messenger
global $config, $user;
// We add some standard variables we always use, no need to specify them always
if (!isset($this->vars['U_BOARD']))
{
$this->assign_vars(array(
'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'])),
));
}
if (!isset($this->vars['SITENAME']))
{
$this->assign_vars(array(
'SITENAME' => htmlspecialchars_decode($config['sitename']),
));
}
// Parse message through template
$this->msg = trim($this->template->assign_display('body'));

View File

@ -464,7 +464,7 @@ class phpbb_template_twig implements phpbb_template
*
* @return array
*/
public function get_template_vars()
protected function get_template_vars()
{
$context_vars = $this->context->get_data_ref();