friendica_2021-01/mod/smilies.php
Adam Magness ca76e49c23 Move remaining functions
update remaining function calls
2018-01-27 08:25:54 -05:00

25 lines
500 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::jsonReturnAndDie($results);
} else {
return Smilies::replace('', true);
}
}