Skip to content

Commit

Permalink
Fix styling code
Browse files Browse the repository at this point in the history
  • Loading branch information
datlechin committed May 10, 2024
1 parent aae4740 commit 734ca81
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@

return [
(new Extend\Frontend('forum'))
->js(__DIR__.'/js/dist/forum.js')
->css(__DIR__.'/less/forum.less'),
->js(__DIR__ . '/js/dist/forum.js')
->css(__DIR__ . '/less/forum.less'),

(new Extend\Frontend('admin'))
->js(__DIR__.'/js/dist/admin.js'),
->js(__DIR__ . '/js/dist/admin.js'),

new Extend\Locales(__DIR__.'/locale'),
new Extend\Locales(__DIR__ . '/locale'),

(new Extend\Event())
->listen(Saving::class, SavePasswordToDatabase::class),
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Controller/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected function data(ServerRequestInterface $request, Document $document)
}
if ($tag->protected_groups) {
if (! $this->hasGroup($actor, json_decode($tag->protected_groups))) {
throw new Exception('Access Denied for Tag Access "'.$tag->name.'".');
throw new Exception('Access Denied for Tag Access "' . $tag->name . '".');
}
}
if (! $actor->isGuest()) {
Expand Down
4 changes: 2 additions & 2 deletions src/Utils/ReferrerFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ public static function findDiscussion(Request $request, int $discussionId): bool
{
// Must check if API is loaded within the direct link of the discussion
$target = $request->getRequestTarget();
if (str_starts_with($target, '/discussions/'.$discussionId)) {
if (str_starts_with($target, '/discussions/' . $discussionId)) {
return true;
}
$headers = $request->getHeaders();
$referers = $headers['referer'] ?? [];
foreach ($referers as &$url) {
$urlPath = parse_url($url, PHP_URL_PATH);
if (str_starts_with($urlPath, '/d/'.$discussionId)) {
if (str_starts_with($urlPath, '/d/' . $discussionId)) {
return true;
}
}
Expand Down

0 comments on commit 734ca81

Please sign in to comment.