f04d40a37e
Rename function, move others
26 lines
492 B
PHP
26 lines
492 B
PHP
<?php
|
|
/**
|
|
* @file mod/smilies.php
|
|
*/
|
|
use Friendica\App;
|
|
use Friendica\Content\Smilies;
|
|
use Friendica\Util\Network;
|
|
|
|
/**
|
|
* @param object $a App
|
|
* @return mixed
|
|
*/
|
|
function smilies_content(App $a)
|
|
{
|
|
if ($a->argv[1] === "json") {
|
|
$tmp = Smilies::getList();
|
|
$results = [];
|
|
for ($i = 0; $i < count($tmp['texts']); $i++) {
|
|
$results[] = ['text' => $tmp['texts'][$i], 'icon' => $tmp['icons'][$i]];
|
|
}
|
|
Network::jsonExit($results);
|
|
} else {
|
|
return Smilies::replace('', true);
|
|
}
|
|
}
|