diff options
author | javiexin <javiexin@gmail.com> | 2015-07-30 10:48:39 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2016-01-02 17:16:23 +0100 |
commit | 917c864bbf51309da4c8bda7ad03e1e00afc0764 (patch) | |
tree | a1578b45dacc00e25758208ceacae02d49626891 /phpBB/phpbb/avatar/manager.php | |
parent | 06f4b6926baaf27897b2f57f7938eed4acf5dedb (diff) | |
download | forums-917c864bbf51309da4c8bda7ad03e1e00afc0764.tar forums-917c864bbf51309da4c8bda7ad03e1e00afc0764.tar.gz forums-917c864bbf51309da4c8bda7ad03e1e00afc0764.tar.bz2 forums-917c864bbf51309da4c8bda7ad03e1e00afc0764.tar.xz forums-917c864bbf51309da4c8bda7ad03e1e00afc0764.zip |
[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 directly when required.
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. Simplified manager
interface by reducing unneeded methods.
PHPBB3-14387
Diffstat (limited to 'phpBB/phpbb/avatar/manager.php')
-rw-r--r-- | phpBB/phpbb/avatar/manager.php | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/phpBB/phpbb/avatar/manager.php b/phpBB/phpbb/avatar/manager.php index 5db9ab13fb..26eb17c265 100644 --- a/phpBB/phpbb/avatar/manager.php +++ b/phpBB/phpbb/avatar/manager.php @@ -246,7 +246,7 @@ class manager */ public function is_enabled($driver) { - $config_name = $this->get_driver_config_name($driver); + $config_name = $driver->get_config_name(); return $this->config["allow_avatar_{$config_name}"]; } @@ -260,7 +260,7 @@ class manager */ public function get_avatar_settings($driver) { - $config_name = $this->get_driver_config_name($driver); + $config_name = $driver->get_config_name(); return array( 'allow_avatar_' . $config_name => array('lang' => 'ALLOW_' . strtoupper(str_replace('\\', '_', $config_name)), 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), @@ -268,30 +268,6 @@ class manager } /** - * Get the config name of an avatar driver - * - * @param object $driver Avatar driver object - * - * @return string Avatar driver config name - */ - public function get_driver_config_name($driver) - { - 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 * * @param \phpbb\user phpBB User object |