aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorNathaniel Guse <nathaniel.guse@gmail.com>2013-07-24 13:38:12 -0500
committerNathaniel Guse <nathaniel.guse@gmail.com>2013-07-24 13:38:12 -0500
commitffbc144a739740ad1901c9eaf481815c9ec2d918 (patch)
treec909e8c63799c861675a83c3ed53f4723b248f70 /phpBB
parent427fa17f7fd9db6f69a6cb4634198a2f484e0bd9 (diff)
downloadforums-ffbc144a739740ad1901c9eaf481815c9ec2d918.tar
forums-ffbc144a739740ad1901c9eaf481815c9ec2d918.tar.gz
forums-ffbc144a739740ad1901c9eaf481815c9ec2d918.tar.bz2
forums-ffbc144a739740ad1901c9eaf481815c9ec2d918.tar.xz
forums-ffbc144a739740ad1901c9eaf481815c9ec2d918.zip
[ticket/11628] Make get_template_vars protected
Remove all references to it and the hacky code in messenger that was using it PHPBB3-11628
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/functions_messenger.php31
-rw-r--r--phpBB/phpbb/template/twig/twig.php2
2 files changed, 8 insertions, 25 deletions
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index 3a9e1fa77b..3bfc1a44f0 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -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']),
- ));
- }
+ $this->assign_vars(array(
+ 'U_BOARD' => generate_board_url(),
+ 'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . htmlspecialchars_decode($config['board_email_sig'])),
+ 'SITENAME' => htmlspecialchars_decode($config['sitename']),
+ ));
// Parse message through template
$this->msg = trim($this->template->assign_display('body'));
diff --git a/phpBB/phpbb/template/twig/twig.php b/phpBB/phpbb/template/twig/twig.php
index 710411c594..582939c252 100644
--- a/phpBB/phpbb/template/twig/twig.php
+++ b/phpBB/phpbb/template/twig/twig.php
@@ -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();