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