mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-01-16 18:04:34 -05:00
fix rendering of collage urls with no collage id
This commit is contained in:
@@ -359,6 +359,9 @@ class Text {
|
||||
return new \Gazelle\Manager\Artist()->findById((int)($args['id'] ?? 0))?->link();
|
||||
|
||||
case '/collages.php':
|
||||
if (!isset($args['id']) && !isset($args['collageid'])) {
|
||||
return "<a href=\"$rawurl\">$url</a>";
|
||||
}
|
||||
return self::bbcodeCollageUrl((int)($args['id'] ?? $args['collageid']));
|
||||
|
||||
case '/forums.php':
|
||||
|
||||
@@ -124,6 +124,12 @@ class TextTest extends TestCase {
|
||||
\Text::full_format($collage->publicLocation()),
|
||||
'text-collage-url'
|
||||
);
|
||||
$url = SITE_URL . '/collages.php?order=subscribers&sort=desc&page=2';
|
||||
$this->assertEquals(
|
||||
"<a href=\"$url\">" . htmlentities($url) . "</a>",
|
||||
\Text::full_format($url),
|
||||
'text-collage-url-no-id',
|
||||
);
|
||||
$commentMan = new Manager\Comment();
|
||||
$comment = $commentMan->create($this->userList['admin'], 'collages', $collage->id, "nice collage!");
|
||||
$this->assertEquals(
|
||||
|
||||
Reference in New Issue
Block a user