]> git.mxchange.org Git - friendica.git/blob - src/Module/Manifest.php
de1dfc915030aaab1d3f6a8c1c343c93fbde50ff
[friendica.git] / src / Module / Manifest.php
1 <?php
2
3 namespace Friendica\Module;
4
5 use Friendica\BaseModule;
6 use Friendica\Core\Renderer;
7 use Friendica\DI;
8
9 class Manifest extends BaseModule
10 {
11         public static function rawContent(array $parameters = [])
12         {
13                 $app = DI::app();
14                 $config = $app->getConfig();
15
16                 $tpl = Renderer::getMarkupTemplate('manifest.tpl');
17
18                 header('Content-type: application/manifest+json');
19
20                 $touch_icon = $config->get('system', 'touch_icon', 'images/friendica-128.png');
21                 if ($touch_icon == '') {
22                         $touch_icon = 'images/friendica-128.png';
23                 }
24
25                 $output = Renderer::replaceMacros($tpl, [
26                         '$touch_icon' => $touch_icon,
27                         '$title' => $config->get('config', 'sitename', 'Friendica'),
28                 ]);
29
30                 echo $output;
31
32                 exit();
33         }
34 }