Move Smilies::getList() into if

This commit is contained in:
Philipp Holzer 2019-05-06 18:46:37 +02:00
parent 23158bc3c8
commit 97f02c2670
No known key found for this signature in database
GPG Key ID: 517BE60E2CE5C8A5

View 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]];