aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorStefan Parviainen <saparvia@caterva.eu>2014-12-21 09:50:47 +0100
committerStefan Parviainen <saparvia@caterva.eu>2014-12-21 09:50:47 +0100
commit4e5118650225fe0e194ac8164c47916575e898b3 (patch)
tree22e1676a173167b6f340fa8826a184d9efe9479b /mod
parentd1f53511921afce820d73eb2d2924e2a4aa8ba14 (diff)
parent148f0eb4aed6fdbec62f50d87e6db0c8df35fe28 (diff)
downloadvolse-hubzilla-4e5118650225fe0e194ac8164c47916575e898b3.tar.gz
volse-hubzilla-4e5118650225fe0e194ac8164c47916575e898b3.tar.bz2
volse-hubzilla-4e5118650225fe0e194ac8164c47916575e898b3.zip
Merge remote-tracking branch 'upstream/master' into autocomplete
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);
+ }
+}