1
1
Fork 0
friendica_2019-12_sharedHos.../mod/smilies.php
Adam Magness 9b8599b619 Move functions to system
move some functions to system
2018-01-27 11:59:10 -05:00

25 lines
490 B
PHP

<?php
/**
* @file mod/smilies.php
*/
use Friendica\App;
use Friendica\Content\Smilies;
use Friendica\Core\System;
/**
* @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]];
}
System::jsonExit($results);
} else {
return Smilies::replace('', true);
}
}