mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-11 03:04:09 +02:00
[feature/avatars] Rewrite drivers to use full class name
* Use full driver class name as avatar_type value * Move avatar drivers to core namespace * Make avatars installable through extensions PHPBB3-10018
This commit is contained in:
@@ -119,4 +119,25 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
**/
|
||||
public function is_enabled()
|
||||
{
|
||||
$driver = preg_replace('#^phpbb_avatar_driver_core_#', '', get_class($this));
|
||||
|
||||
return $this->config["allow_avatar_$driver"];
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
**/
|
||||
public function get_template_name()
|
||||
{
|
||||
$driver = preg_replace('#^phpbb_avatar_driver_core_#', '', get_class($this));
|
||||
$template = "ucp_avatar_options_$driver.html";
|
||||
|
||||
return $template;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user