1
0
mirror of https://github.com/flarum/core.git synced 2025-10-12 15:34:26 +02:00

Combine URL generator classes into one

This commit is contained in:
Franz Liedke
2017-06-25 23:33:02 +02:00
parent f824dcfb53
commit b72407440d
19 changed files with 104 additions and 111 deletions

View File

@@ -11,8 +11,8 @@
namespace Flarum\Api\Serializer;
use Flarum\Forum\UrlGenerator;
use Flarum\Foundation\Application;
use Flarum\Http\UrlGenerator;
use Flarum\Settings\SettingsRepositoryInterface;
class ForumSerializer extends AbstractSerializer
@@ -107,7 +107,7 @@ class ForumSerializer extends AbstractSerializer
{
$logoPath = $this->settings->get('logo_path');
return $logoPath ? $this->url->toPath('assets/'.$logoPath) : null;
return $logoPath ? $this->url->to('forum')->path('assets/'.$logoPath) : null;
}
/**
@@ -117,6 +117,6 @@ class ForumSerializer extends AbstractSerializer
{
$faviconPath = $this->settings->get('favicon_path');
return $faviconPath ? $this->url->toPath('assets/'.$faviconPath) : null;
return $faviconPath ? $this->url->to('forum')->path('assets/'.$faviconPath) : null;
}
}