mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-12 01:54:26 +02:00
rework autocomplete: Access list of smilies over JSON
This commit is contained in:
parent
162f754e2d
commit
5f7c5e6ab6
4 changed files with 215 additions and 156 deletions
|
@ -1344,3 +1344,18 @@ function short_link($url) {
|
|||
}
|
||||
return $slinky->short();
|
||||
}};
|
||||
|
||||
/**
|
||||
* @brief Encodes content to json
|
||||
*
|
||||
* This function encodes an array to json format
|
||||
* and adds an application/json HTTP header to the output.
|
||||
* After finishing the process is getting killed.
|
||||
*
|
||||
* @param array $x
|
||||
*/
|
||||
function json_return_and_die($x) {
|
||||
header("content-type: application/json");
|
||||
echo json_encode($x);
|
||||
killme();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue