e36f2bb1fb
- Add short form array syntax to po2php.php generation
26 lines
467 B
PHP
26 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);
|
|
}
|
|
}
|