1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 12:03:21 +01:00

Merge remote-tracking branch 'Marc/ticket/11859' into develop

* Marc/ticket/11859:
  [ticket/11859] Add missing get_template_name method to test drivers
  [ticket/11859] Make avatar drivers return template filename
This commit is contained in:
Joas Schilling 2013-12-12 10:21:36 +01:00
commit 4816446c4a
7 changed files with 42 additions and 11 deletions

View File

@ -109,17 +109,6 @@ abstract class driver implements \phpbb\avatar\driver\driver_interface
return true;
}
/**
* @inheritdoc
*/
public function get_template_name()
{
$driver = preg_replace('#^phpbb\\\\avatar\\\\driver\\\\#', '', get_class($this));
$template = "ucp_avatar_options_$driver.html";
return $template;
}
/**
* @inheritdoc
*/

View File

@ -146,6 +146,14 @@ class gravatar extends \phpbb\avatar\driver\driver
);
}
/**
* @inheritdoc
*/
public function get_template_name()
{
return 'ucp_avatar_options_gravatar.html';
}
/**
* Build gravatar URL for output on page
*

View File

@ -134,6 +134,14 @@ class local extends \phpbb\avatar\driver\driver
);
}
/**
* @inheritdoc
*/
public function get_template_name()
{
return 'ucp_avatar_options_local.html';
}
/**
* Get a list of avatars that are locally available
* Results get cached for 24 hours (86400 seconds)

View File

@ -186,4 +186,12 @@ class remote extends \phpbb\avatar\driver\driver
'avatar_height' => $height,
);
}
/**
* @inheritdoc
*/
public function get_template_name()
{
return 'ucp_avatar_options_remote.html';
}
}

View File

@ -167,6 +167,14 @@ class upload extends \phpbb\avatar\driver\driver
return true;
}
/**
* @inheritdoc
*/
public function get_template_name()
{
return 'ucp_avatar_options_upload.html';
}
/**
* Check if user is able to upload an avatar
*

View File

@ -18,4 +18,9 @@ class barfoo extends \phpbb\avatar\driver\driver
{
return false;
}
public function get_template_name()
{
return 'barfoo.html';
}
}

View File

@ -18,4 +18,9 @@ class foobar extends \phpbb\avatar\driver\driver
{
return false;
}
public function get_template_name()
{
return 'foobar.html';
}
}