diff options
| author | Michael Cullum <unknownbliss@phpbbdevelopers.net> | 2012-05-20 14:18:11 +0100 |
|---|---|---|
| committer | Unknown Bliss <m@michaelcullum.com> | 2012-09-01 15:05:04 +0100 |
| commit | dd4f07f9bb864bdac8b6c4009d166f1df6411419 (patch) | |
| tree | d0b976cddee2746a3e170262998e3771b061f3c7 /phpBB | |
| parent | 3e6761b0266dfc67f6b41fea50d377b7621dffe0 (diff) | |
| download | forums-dd4f07f9bb864bdac8b6c4009d166f1df6411419.tar forums-dd4f07f9bb864bdac8b6c4009d166f1df6411419.tar.gz forums-dd4f07f9bb864bdac8b6c4009d166f1df6411419.tar.bz2 forums-dd4f07f9bb864bdac8b6c4009d166f1df6411419.tar.xz forums-dd4f07f9bb864bdac8b6c4009d166f1df6411419.zip | |
[ticket/10631] Template shouldn't be required
PHPBB3-10631
Diffstat (limited to 'phpBB')
| -rw-r--r-- | phpBB/includes/extension/metadata_manager.php | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/phpBB/includes/extension/metadata_manager.php b/phpBB/includes/extension/metadata_manager.php index 6ec5a0f76d..fea66c86fe 100644 --- a/phpBB/includes/extension/metadata_manager.php +++ b/phpBB/includes/extension/metadata_manager.php @@ -27,7 +27,6 @@ class phpbb_extension_metadata_manager protected $db; protected $phpbb_root_path; protected $ext_name; - protected $template; public $metadata; protected $metadata_file; @@ -39,14 +38,13 @@ class phpbb_extension_metadata_manager * @param string $phpbb_root_path Path to the phpbb includes directory. * @param string $phpEx php file extension */ - public function __construct($ext_name, dbal $db, phpbb_extension_manager $extension_manager, $phpbb_root_path, $phpEx = '.php', phpbb_template $template) + public function __construct($ext_name, dbal $db, phpbb_extension_manager $extension_manager, $phpbb_root_path, $phpEx = '.php') { $this->phpbb_root_path = $phpbb_root_path; $this->db = $db; $this->phpEx = $phpEx; $this->extension_manager = $extension_manager; $this->ext_name = $ext_name; - $this->template = $template; $this->metadata = array(); $this->metadata_file = ''; } @@ -58,7 +56,7 @@ class phpbb_extension_metadata_manager * @param boolean $template_output True if you want the requested metadata assigned to template vars * @return array Contains all of the requested metadata */ - public function get_metadata($element = 'all', $template_output = false) + public function get_metadata($element = 'all', $template_output = false, phpbb_template $template) { // TODO: Check ext_name exists and is an extension that exists if (!$this->set_metadata_file()) @@ -77,7 +75,7 @@ class phpbb_extension_metadata_manager if ($template_output) { - $this->output_template_data(); + $this->output_template_data($template); } return $this->metadata; @@ -88,7 +86,7 @@ class phpbb_extension_metadata_manager { if ($template_output) { - $this->template->assign_vars(array( + $template->assign_vars(array( 'MD_NAME' => htmlspecialchars($this->metadata['name']), )); } @@ -309,7 +307,7 @@ class phpbb_extension_metadata_manager * * @return null */ - public function output_template_data() + public function output_template_data(phpbb_template $template) { $template->assign_vars(array( 'MD_NAME' => htmlspecialchars($this->metadata['name']), |
