]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/ThemeDetails.php
Apply suggestions from code review
[friendica.git] / src / Module / ThemeDetails.php
index 5b931e117244a0e1696e240956fa1a2cf48739ba..1291d3309552b672acd167bd088b619f69e9d85c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -22,6 +22,7 @@
 namespace Friendica\Module;
 
 use Friendica\BaseModule;
+use Friendica\Core\System;
 use Friendica\Core\Theme;
 
 /**
@@ -29,7 +30,7 @@ use Friendica\Core\Theme;
  */
 class ThemeDetails extends BaseModule
 {
-       public function rawContent()
+       protected function rawContent(array $request = [])
        {
                if (!empty($_REQUEST['theme'])) {
                        $theme = $_REQUEST['theme'];
@@ -40,13 +41,13 @@ class ThemeDetails extends BaseModule
                        $version     = $info['version']     ?? '';
                        $credits     = $info['credits']     ?? '';
 
-                       echo json_encode([
+                       System::jsonExit([
                                'img'     => Theme::getScreenshot($theme),
                                'desc'    => $description,
                                'version' => $version,
                                'credits' => $credits,
                        ]);
                }
-               exit();
+               System::exit();
        }
 }