]> git.mxchange.org Git - friendica.git/blob - mod/manifest.php
Catch HTTPExceptions in App::runFrontend()
[friendica.git] / mod / manifest.php
1 <?php
2
3 use Friendica\App;
4 use Friendica\Core\System;
5 use Friendica\Core\Config;
6 use Friendica\Core\Renderer;
7
8 function manifest_content(App $a) {
9
10         $tpl = Renderer::getMarkupTemplate('manifest.tpl');
11
12         header('Content-type: application/manifest+json');
13
14         $touch_icon = Config::get('system', 'touch_icon', 'images/friendica-128.png');
15         if ($touch_icon == '') {
16                 $touch_icon = 'images/friendica-128.png';
17         }
18
19         $o = Renderer::replaceMacros($tpl, [
20                 '$baseurl' => System::baseUrl(),
21                 '$touch_icon' => $touch_icon,
22                 '$title' => Config::get('config', 'sitename', 'Friendica'),
23         ]);
24
25         echo $o;
26
27         killme();
28 }