X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FThemeDetails.php;h=1291d3309552b672acd167bd088b619f69e9d85c;hb=8038c1b04ffa723ebd28610fb72927d8d21b3577;hp=7b53d1cfde928f89cbf9fa92b536af59d455db7b;hpb=bd604d1cfb07fe43016f07a6d1f82877dd910b4c;p=friendica.git diff --git a/src/Module/ThemeDetails.php b/src/Module/ThemeDetails.php index 7b53d1cfde..1291d33095 100644 --- a/src/Module/ThemeDetails.php +++ b/src/Module/ThemeDetails.php @@ -1,8 +1,28 @@ . + * + */ namespace Friendica\Module; use Friendica\BaseModule; +use Friendica\Core\System; use Friendica\Core\Theme; /** @@ -10,24 +30,24 @@ use Friendica\Core\Theme; */ class ThemeDetails extends BaseModule { - public static function rawContent() + protected function rawContent(array $request = []) { if (!empty($_REQUEST['theme'])) { $theme = $_REQUEST['theme']; $info = Theme::getInfo($theme); // Unfortunately there will be no translation for this string - $description = defaults($info, 'description', ''); - $version = defaults($info, 'version' , ''); - $credits = defaults($info, 'credits' , ''); + $description = $info['description'] ?? ''; + $version = $info['version'] ?? ''; + $credits = $info['credits'] ?? ''; - echo json_encode([ + System::jsonExit([ 'img' => Theme::getScreenshot($theme), 'desc' => $description, 'version' => $version, 'credits' => $credits, ]); } - exit(); + System::exit(); } }