]> git.mxchange.org Git - friendica.git/blobdiff - mod/manifest.php
Prevents 4 E_NOTICEs when POST fields are not set. (#5458)
[friendica.git] / mod / manifest.php
index 6dc0d10a21f5d3340862f54e0fd33615be65b83e..a651f51662a923d5a55d90cdd1c51002ef01ac5c 100644 (file)
@@ -1,26 +1,27 @@
 <?php
-    use Friendica\Core\Config;
 
-    function manifest_content(App $a) {
+use Friendica\App;
+use Friendica\Core\System;
+use Friendica\Core\Config;
 
-               $tpl = get_markup_template('manifest.tpl');
+function manifest_content(App $a) {
 
-               header('Content-type: application/manifest+json');
+       $tpl = get_markup_template('manifest.tpl');
 
-               $touch_icon = Config::get('system', 'touch_icon', 'images/friendica-128.png');
-               if ($touch_icon == '') {
-                       $touch_icon = 'images/friendica-128.png';
-               }
+       header('Content-type: application/manifest+json');
 
-               $o = replace_macros($tpl, array(
-                       '$baseurl' => App::get_baseurl(),
-                       '$touch_icon' => $touch_icon,
-                       '$title' => Config::get('config', 'sitename', 'Friendica'),
-               ));
+       $touch_icon = Config::get('system', 'touch_icon', 'images/friendica-128.png');
+       if ($touch_icon == '') {
+               $touch_icon = 'images/friendica-128.png';
+       }
 
-               echo $o;
+       $o = replace_macros($tpl, [
+               '$baseurl' => System::baseUrl(),
+               '$touch_icon' => $touch_icon,
+               '$title' => Config::get('config', 'sitename', 'Friendica'),
+       ]);
 
-               killme();
+       echo $o;
 
-       }
-?>
+       killme();
+}