]> git.mxchange.org Git - friendica.git/blob - mod/smilies.php
Merge branch 'develop' into rewrites/dbm_is_result
[friendica.git] / mod / smilies.php
1 <?php
2
3 /**
4  * @file mod/smilies.php
5  */
6
7 require_once("include/Smilies.php");
8
9 function smilies_content(App &$a) {
10         if ($a->argv[1]==="json"){
11                 $tmp = Smilies::get_list();
12                 $results = array();
13                 for($i = 0; $i < count($tmp['texts']); $i++) {
14                         $results[] = array('text' => $tmp['texts'][$i], 'icon' => $tmp['icons'][$i]);
15                 }
16                 json_return_and_die($results);
17         }
18         else {
19                 return Smilies::replace('',true);
20         }
21 }