aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Smilies.php
blob: efac07f844c6d2860706900d339501a343a6834a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
namespace Zotlabs\Module;


class Smilies extends \Zotlabs\Web\Controller {

	function get() { 
		if (\App::$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);
		}
	}
	
}