[ticket/13680] Renamed get_quote_authors to get_outermost_quote_authors

PHPBB3-13680
This commit is contained in:
JoshyPHP 2015-05-15 02:12:52 +02:00
parent f5ce9f2738
commit f7ad2c2b32
4 changed files with 9 additions and 9 deletions

View file

@ -75,7 +75,7 @@ class quote extends \phpbb\notification\type\post
'ignore_users' => array(),
), $options);
$usernames = $this->utils->get_quote_authors($post['post_text']);
$usernames = $this->utils->get_outermost_quote_authors($post['post_text']);
if (empty($usernames))
{

View file

@ -35,12 +35,12 @@ class utils implements \phpbb\textformatter\utils_interface
}
/**
* Get a list of quote authors, limited to the first level of quotes
* Get a list of quote authors, limited to the outermost quotes
*
* @param string $xml Parsed text
* @return string[] List of authors
*/
public function get_quote_authors($xml)
public function get_outermost_quote_authors($xml)
{
$authors = array();
if (strpos($xml, '<QUOTE ') === false)

View file

@ -29,12 +29,12 @@ interface utils_interface
public function clean_formatting($text);
/**
* Get a list of quote authors, limited to the first level of quotes
* Get a list of quote authors, limited to the outermost quotes
*
* @param string $text Parsed text
* @return string[] List of authors
*/
public function get_quote_authors($text);
public function get_outermost_quote_authors($text);
/**
* Remove given BBCode and its content, at given nesting depth

View file

@ -75,18 +75,18 @@ class phpbb_textformatter_s9e_utils_test extends phpbb_test_case
}
/**
* @dataProvider get_quote_authors_tests
* @dataProvider get_outermost_quote_authors_tests
*/
public function test_get_quote_authors($original, $expected)
public function test_get_outermost_quote_authors($original, $expected)
{
$container = $this->get_test_case_helpers()->set_s9e_services();
$utils = $container->get('text_formatter.utils');
$parser = $container->get('text_formatter.parser');
$this->assertSame($expected, $utils->get_quote_authors($parser->parse($original)));
$this->assertSame($expected, $utils->get_outermost_quote_authors($parser->parse($original)));
}
public function get_quote_authors_tests()
public function get_outermost_quote_authors_tests()
{
return array(
array(