aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-12-20 15:42:44 -0800
committerfriendica <info@friendica.com>2014-12-20 15:42:44 -0800
commit148f0eb4aed6fdbec62f50d87e6db0c8df35fe28 (patch)
tree16cbf075a0f3be7eb100ad9c44c70ebd9d44f3f5 /mod
parentce032531dc63e2be232477bca11bac3aa3dfe314 (diff)
parent9684d682aef5a3fb869498522a6740bb4d721839 (diff)
downloadvolse-hubzilla-148f0eb4aed6fdbec62f50d87e6db0c8df35fe28.tar.gz
volse-hubzilla-148f0eb4aed6fdbec62f50d87e6db0c8df35fe28.tar.bz2
volse-hubzilla-148f0eb4aed6fdbec62f50d87e6db0c8df35fe28.zip
Merge https://github.com/friendica/red into pending_merge
Diffstat (limited to 'mod')
-rw-r--r--mod/smilies.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/mod/smilies.php b/mod/smilies.php
index c47f95da7..b22d0c6d2 100644
--- a/mod/smilies.php
+++ b/mod/smilies.php
@@ -1,3 +1,15 @@
<?php
-function smilies_content(&$a) { return smilies('',true); }
+function smilies_content(&$a) {
+ if ($a->argv[1]==="json"){
+ $tmp = list_smilies();
+ $results = array();
+ for($i = 0; $i < count($tmp['texts']); $i++) {
+ $results[] = array('text' => $tmp['texts'][$i], 'icon' => $tmp['icons'][$i]);
+ }
+ json_return_and_die($results);
+ }
+ else {
+ return smilies('',true);
+ }
+}