]> git.mxchange.org Git - friendica.git/commitdiff
Move Smilies::getList() into if
authorPhilipp Holzer <admin@philipp.info>
Mon, 6 May 2019 16:46:37 +0000 (18:46 +0200)
committerPhilipp Holzer <admin@philipp.info>
Mon, 6 May 2019 16:46:37 +0000 (18:46 +0200)
src/Module/Smilies.php

index 346ae0914438807c2446172e06d25fc3aa94d3cd..422f37d3e54bbb40df037546c347a954120d60a5 100644 (file)
@@ -15,9 +15,9 @@ class Smilies extends BaseModule
        public static function rawContent()
        {
                $app = self::getApp();
-               $smilies = Content\Smilies::getList();
 
                if (!empty($app->argv[1]) && ($app->argv[1] === "json")) {
+                       $smilies = Content\Smilies::getList();
                        $results = [];
                        for ($i = 0; $i < count($smilies['texts']); $i++) {
                                $results[] = ['text' => $smilies['texts'][$i], 'icon' => $smilies['icons'][$i]];