]> git.mxchange.org Git - friendica.git/blob - mod/smilies.php
Fix formatting and PHP notice in mod/photos
[friendica.git] / mod / smilies.php
1 <?php
2
3 /**
4  * @file mod/smilies.php
5  */
6 use Friendica\App;
7 use Friendica\Content\Smilies;
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 = array();
18                 for ($i = 0; $i < count($tmp['texts']); $i++) {
19                         $results[] = array('text' => $tmp['texts'][$i], 'icon' => $tmp['icons'][$i]);
20                 }
21                 json_return_and_die($results);
22         } else {
23                 return Smilies::replace('', true);
24         }
25 }