mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
Merge pull request #3758 from s9e/ticket/14008
[ticket/14008] Do not add a user_id value to quotes from guests
This commit is contained in:
commit
da0897323b
2 changed files with 15 additions and 0 deletions
|
@ -70,6 +70,12 @@ class utils implements \phpbb\textformatter\utils_interface
|
||||||
$quote .= '=' . $this->format_attribute_value($attributes['author']);
|
$quote .= '=' . $this->format_attribute_value($attributes['author']);
|
||||||
unset($attributes['author']);
|
unset($attributes['author']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($attributes['user_id']) && $attributes['user_id'] == ANONYMOUS)
|
||||||
|
{
|
||||||
|
unset($attributes['user_id']);
|
||||||
|
}
|
||||||
|
|
||||||
ksort($attributes);
|
ksort($attributes);
|
||||||
foreach ($attributes as $name => $value)
|
foreach ($attributes as $name => $value)
|
||||||
{
|
{
|
||||||
|
|
|
@ -175,6 +175,15 @@ class phpbb_textformatter_s9e_utils_test extends phpbb_test_case
|
||||||
),
|
),
|
||||||
'[quote=user post_id=123 url=http://example.org]...[/quote]',
|
'[quote=user post_id=123 url=http://example.org]...[/quote]',
|
||||||
),
|
),
|
||||||
|
array(
|
||||||
|
'...',
|
||||||
|
array(
|
||||||
|
'author' => 'user',
|
||||||
|
'post_id' => 123,
|
||||||
|
'user_id' => ANONYMOUS
|
||||||
|
),
|
||||||
|
'[quote=user post_id=123]...[/quote]',
|
||||||
|
),
|
||||||
array(
|
array(
|
||||||
'...',
|
'...',
|
||||||
array('author' => ' '),
|
array('author' => ' '),
|
||||||
|
|
Loading…
Add table
Reference in a new issue