mirror of
https://github.com/friendica/friendica
synced 2024-12-22 22:40:16 +00:00
Merge pull request #14580 from annando/shortcut
Added check for shortcut icon url parts
This commit is contained in:
commit
d48d23afa1
1 changed files with 4 additions and 2 deletions
|
@ -14,6 +14,7 @@ use Friendica\BaseModule;
|
||||||
use Friendica\Core\Config\Capability\IManageConfigValues;
|
use Friendica\Core\Config\Capability\IManageConfigValues;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Util\BasePath;
|
use Friendica\Util\BasePath;
|
||||||
|
use Friendica\Util\Network;
|
||||||
use Friendica\Util\Profiler;
|
use Friendica\Util\Profiler;
|
||||||
use Friendica\Util\XML;
|
use Friendica\Util\XML;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
|
@ -68,11 +69,12 @@ class OpenSearch extends BaseModule
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($shortcut_icon)) {
|
if (!empty($shortcut_icon)) {
|
||||||
$imagedata = getimagesize($this->baseUrl . $shortcut_icon);
|
$shortcut_icon = Network::addBasePath($shortcut_icon, $this->baseUrl);
|
||||||
|
$imagedata = getimagesize($shortcut_icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($imagedata)) {
|
if (!empty($imagedata)) {
|
||||||
XML::addElement($xml, $parent, 'Image', $this->baseUrl . $shortcut_icon, [
|
XML::addElement($xml, $parent, 'Image', $shortcut_icon, [
|
||||||
'width' => $imagedata[0],
|
'width' => $imagedata[0],
|
||||||
'height' => $imagedata[1],
|
'height' => $imagedata[1],
|
||||||
'type' => $imagedata['mime'],
|
'type' => $imagedata['mime'],
|
||||||
|
|
Loading…
Reference in a new issue