1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-08 17:56:52 +02:00

[ticket/11854] Use a set_name method instead of overriding get_service_name

PHPBB3-11854
This commit is contained in:
Tristan Darricau
2014-08-10 15:10:14 +02:00
parent 76633544ee
commit fa2ac1f271
6 changed files with 46 additions and 27 deletions

View File

@@ -27,6 +27,11 @@ abstract class captcha_abstract
var $solved = 0;
var $captcha_vars = false;
/**
* @var string name of the service.
*/
protected $service_name;
function init($type)
{
global $config, $db, $user;
@@ -363,7 +368,20 @@ abstract class captcha_abstract
/**
* @return string the name of the service corresponding to the plugin
*/
abstract function get_service_name();
function get_service_name()
{
return $this->service_name;
}
/**
* Set the name of the plugin
*
* @param string $name
*/
public function set_name($name)
{
$this->service_name = $name;
}
/**
* @return string the name of the class used to generate the captcha