diff options
author | Vjacheslav Trushkin <arty@phpbb.com> | 2012-04-01 20:19:07 +0300 |
---|---|---|
committer | Vjacheslav Trushkin <arty@phpbb.com> | 2012-04-01 20:19:07 +0300 |
commit | fb0df8d2e398a634457b317a721734e53596f002 (patch) | |
tree | bf42ceb2794a520caccbd7062e07bf5aac03023d /phpBB/includes/style | |
parent | b548389207fbf8e7c0d3287cd8704f05119d853a (diff) | |
download | forums-fb0df8d2e398a634457b317a721734e53596f002.tar forums-fb0df8d2e398a634457b317a721734e53596f002.tar.gz forums-fb0df8d2e398a634457b317a721734e53596f002.tar.bz2 forums-fb0df8d2e398a634457b317a721734e53596f002.tar.xz forums-fb0df8d2e398a634457b317a721734e53596f002.zip |
[ticket/10665] Moving filter parameters to one array
Moving filter parameters to one array in template compiler class
PHPBB3-10665
Diffstat (limited to 'phpBB/includes/style')
-rw-r--r-- | phpBB/includes/style/template_compile.php | 34 |
1 files changed, 6 insertions, 28 deletions
diff --git a/phpBB/includes/style/template_compile.php b/phpBB/includes/style/template_compile.php index bd9e18e102..fa0928f424 100644 --- a/phpBB/includes/style/template_compile.php +++ b/phpBB/includes/style/template_compile.php @@ -33,25 +33,6 @@ class phpbb_style_template_compile private $filter_params; /** - * Whether <!-- PHP --> tags are allowed - * - * @var bool - */ - private $allow_php; - - /** - * Style resource locator - * - * @var phpbb_style_resource_locator - */ - private $locator; - - /** - * @var string phpBB root path - */ - private $phpbb_root_path; - - /** * Constructor. * * @param bool @allow_php Whether PHP code will be allowed in templates (inline PHP code, PHP tag and INCLUDEPHP tag) @@ -60,10 +41,11 @@ class phpbb_style_template_compile */ public function __construct($allow_php, $locator, $phpbb_root_path) { - $this->filter_params = array(); - $this->allow_php = $allow_php; - $this->locator = $locator; - $this->phpbb_root_path = $phpbb_root_path; + $this->filter_params = array( + 'allow_php' => $allow_php, + 'locator' => $locator, + 'phpbb_root_path' => $phpbb_root_path + ); } /** @@ -140,11 +122,7 @@ class phpbb_style_template_compile */ private function compile_stream_to_stream($source_stream, $dest_stream) { - $params = $this->filter_params; - $params['allow_php'] = $this->allow_php; - $params['locator'] = $this->locator; - $params['phpbb_root_path'] = $this->phpbb_root_path; - stream_filter_append($source_stream, 'phpbb_template', null, $params); + stream_filter_append($source_stream, 'phpbb_template', null, $this->filter_params); stream_copy_to_stream($source_stream, $dest_stream); } } |