X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FThemeDetails.php;h=82d2ff18601486a16fe2e7c7982827f5b2985953;hb=c18bda9397d0ea9d68ea7a81e6292459317fdbf5;hp=7b53d1cfde928f89cbf9fa92b536af59d455db7b;hpb=20c9d5fe1dfdea55f920a1a53a1d34e4a540a0a4;p=friendica.git diff --git a/src/Module/ThemeDetails.php b/src/Module/ThemeDetails.php index 7b53d1cfde..82d2ff1860 100644 --- a/src/Module/ThemeDetails.php +++ b/src/Module/ThemeDetails.php @@ -1,4 +1,23 @@ . + * + */ namespace Friendica\Module; @@ -10,16 +29,16 @@ 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([ 'img' => Theme::getScreenshot($theme),