mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-08 13:14:27 +02:00
Fix code style
This commit is contained in:
parent
b2bbcc4965
commit
02fae146e6
17 changed files with 134 additions and 118 deletions
|
@ -31,7 +31,7 @@ class ParseUrl extends BaseModule
|
|||
{
|
||||
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
|
||||
|
||||
$this->userSession = $userSession;
|
||||
$this->userSession = $userSession;
|
||||
$this->eventDispatcher = $eventDispatcher;
|
||||
}
|
||||
|
||||
|
@ -41,10 +41,10 @@ class ParseUrl extends BaseModule
|
|||
throw new \Friendica\Network\HTTPException\ForbiddenException();
|
||||
}
|
||||
|
||||
$format = '';
|
||||
$title = '';
|
||||
$format = '';
|
||||
$title = '';
|
||||
$description = '';
|
||||
$ret = ['success' => false, 'contentType' => ''];
|
||||
$ret = ['success' => false, 'contentType' => ''];
|
||||
|
||||
if (!empty($_GET['binurl']) && Util\Strings::isHex($_GET['binurl'])) {
|
||||
$url = trim(hex2bin($_GET['binurl']));
|
||||
|
@ -85,9 +85,9 @@ class ParseUrl extends BaseModule
|
|||
}
|
||||
|
||||
$hook_data = [
|
||||
'url' => $url,
|
||||
'url' => $url,
|
||||
'format' => $format,
|
||||
'text' => null,
|
||||
'text' => null,
|
||||
];
|
||||
|
||||
$hook_data = $this->eventDispatcher->dispatch(
|
||||
|
@ -119,14 +119,14 @@ class ParseUrl extends BaseModule
|
|||
}
|
||||
|
||||
$ret['contentType'] = $content_type;
|
||||
$ret['data'] = ['url' => $url];
|
||||
$ret['success'] = true;
|
||||
$ret['data'] = ['url' => $url];
|
||||
$ret['success'] = true;
|
||||
} else {
|
||||
unset($siteinfo['keywords']);
|
||||
|
||||
$ret['data'] = $siteinfo;
|
||||
$ret['data'] = $siteinfo;
|
||||
$ret['contentType'] = 'attachment';
|
||||
$ret['success'] = true;
|
||||
$ret['success'] = true;
|
||||
}
|
||||
|
||||
$this->jsonExit($ret);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue