mirror of
https://github.com/friendica/friendica
synced 2025-04-21 15:50:13 +00:00
Move mod/manifset to src/Module/Manifset
This commit is contained in:
parent
9d3a131204
commit
ac96e1bf3e
3 changed files with 36 additions and 30 deletions
34
src/Module/Manifest.php
Normal file
34
src/Module/Manifest.php
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
namespace Friendica\Module;
|
||||
|
||||
use Friendica\BaseModule;
|
||||
use Friendica\Core\Renderer;
|
||||
|
||||
class Manifest extends BaseModule
|
||||
{
|
||||
public static function rawContent()
|
||||
{
|
||||
$app = self::getApp();
|
||||
$config = $app->getConfig();
|
||||
|
||||
$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, [
|
||||
'$baseurl' => $app->getBaseURL(),
|
||||
'$touch_icon' => $touch_icon,
|
||||
'$title' => $config->get('config', 'sitename', 'Friendica'),
|
||||
]);
|
||||
|
||||
echo $output;
|
||||
|
||||
exit();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue