From 06f4b6926baaf27897b2f57f7938eed4acf5dedb Mon Sep 17 00:00:00 2001 From: javiexin Date: Thu, 30 Jul 2015 01:43:18 +0200 Subject: [ticket/14387] Extend avatar-driver by extension in ACP not possible Create two driver methods to provide the driver config name and the driver ACP template name, and use them within the manager method. Default driver config name and template name are the same as now. But new drivers are able to override the config name and template name with their own, including @vendor_extension. PHPBB3-14387 --- phpBB/phpbb/avatar/manager.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'phpBB/phpbb/avatar/manager.php') diff --git a/phpBB/phpbb/avatar/manager.php b/phpBB/phpbb/avatar/manager.php index 5274ac6a26..5db9ab13fb 100644 --- a/phpBB/phpbb/avatar/manager.php +++ b/phpBB/phpbb/avatar/manager.php @@ -279,6 +279,18 @@ class manager return $driver->get_config_name(); } + /** + * Get the template name of an avatar driver + * + * @param object $driver Avatar driver object + * + * @return string Avatar driver template name + */ + public function get_driver_template_name($driver) + { + return $driver->get_acp_template_name(); + } + /** * Replace "error" strings with their real, localized form * -- cgit v1.2.1