1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-12 11:44:08 +02:00

[ticket/14925] Set reparser names in service definitions

PHPBB3-14925
This commit is contained in:
Matt Friedman
2016-12-18 01:28:51 -08:00
parent 544c7c4e08
commit b4748a5d1e
7 changed files with 87 additions and 14 deletions

View File

@@ -15,6 +15,11 @@ namespace phpbb\textreparser;
abstract class base implements reparser_interface
{
/**
* @var string The reparser name
*/
protected $name;
/**
* @var bool Whether to save changes to the database
*/
@@ -89,6 +94,26 @@ abstract class base implements reparser_interface
return $record;
}
/**
* Returns the name of the reparser
*
* @return string Name of reparser
*/
public function get_name()
{
return $this->name;
}
/**
* Sets the name of the reparser
*
* @param string $name The reparser name
*/
public function set_name($name)
{
$this->name = $name;
}
/**
* Disable saving changes to the database
*/
@@ -231,7 +256,7 @@ abstract class base implements reparser_interface
$unparsed['enable_flash_bbcode'],
$unparsed['enable_quote_bbcode'],
$unparsed['enable_url_bbcode'],
'reparse'
$this->get_name()
);
// Save the new text if it has changed and it's not a dry run