]> git.mxchange.org Git - friendica.git/blob - mod/smilies.php
Remove unused global cache constants
[friendica.git] / mod / smilies.php
1 <?php
2 /**
3  * @file mod/smilies.php
4  */
5 use Friendica\App;
6 use Friendica\Content\Smilies;
7 use Friendica\Core\System;
8
9 /**
10  * @param object $a App
11  * @return mixed
12  */
13 function smilies_content(App $a)
14 {
15         if ($a->argv[1] === "json") {
16                 $tmp = Smilies::getList();
17                 $results = [];
18                 for ($i = 0; $i < count($tmp['texts']); $i++) {
19                         $results[] = ['text' => $tmp['texts'][$i], 'icon' => $tmp['icons'][$i]];
20                 }
21                 System::jsonExit($results);
22         } else {
23                 return Smilies::replace('', true);
24         }
25 }