mirror of
https://github.com/friendica/friendica
synced 2024-12-23 07:20:15 +00:00
e36f2bb1fb
- Add short form array syntax to po2php.php generation
25 lines
467 B
PHP
25 lines
467 B
PHP
<?php
|
|
|
|
/**
|
|
* @file mod/smilies.php
|
|
*/
|
|
use Friendica\App;
|
|
use Friendica\Content\Smilies;
|
|
|
|
/**
|
|
* @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]];
|
|
}
|
|
json_return_and_die($results);
|
|
} else {
|
|
return Smilies::replace('', true);
|
|
}
|
|
}
|