2019-04-22 12:48:40 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Friendica\Module;
|
|
|
|
|
|
|
|
use Friendica\BaseModule;
|
|
|
|
use Friendica\Core\Renderer;
|
2019-12-15 22:34:11 +01:00
|
|
|
use Friendica\DI;
|
2019-04-22 12:48:40 +02:00
|
|
|
|
|
|
|
class Manifest extends BaseModule
|
|
|
|
{
|
2019-11-05 22:48:54 +01:00
|
|
|
public static function rawContent(array $parameters = [])
|
2019-04-22 12:48:40 +02:00
|
|
|
{
|
2019-12-15 23:44:33 +01:00
|
|
|
$config = DI::config();
|
2019-04-22 12:48:40 +02:00
|
|
|
|
|
|
|
$tpl = Renderer::getMarkupTemplate('manifest.tpl');
|
|
|
|
|
|
|
|
header('Content-type: application/manifest+json');
|
|
|
|
|
|
|
|
$touch_icon = $config->get('system', 'touch_icon', 'images/friendica-128.png');
|
|
|
|
if ($touch_icon == '') {
|
|
|
|
$touch_icon = 'images/friendica-128.png';
|
|
|
|
}
|
|
|
|
|
|
|
|
$output = Renderer::replaceMacros($tpl, [
|
|
|
|
'$touch_icon' => $touch_icon,
|
|
|
|
'$title' => $config->get('config', 'sitename', 'Friendica'),
|
|
|
|
]);
|
|
|
|
|
|
|
|
echo $output;
|
|
|
|
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
}
|