mirror of
https://github.com/friendica/friendica
synced 2025-04-28 17:04:23 +02:00
Merge pull request #5253 from rabuzarus/20180616_-_magic_auth_test_2
Port hubzillas OpenWebAuth - remote authentification
This commit is contained in:
commit
a5550b4702
15 changed files with 1196 additions and 50 deletions
|
@ -163,17 +163,17 @@ EOT;
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Encodes content to json
|
||||
* @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 The input content
|
||||
* @param array $x The input content.
|
||||
* @param string $content_type Type of the input (Default: 'application/json').
|
||||
*/
|
||||
public static function jsonExit($x)
|
||||
{
|
||||
header("content-type: application/json");
|
||||
public static function jsonExit($x, $content_type = 'application/json') {
|
||||
header("Content-type: $content_type");
|
||||
echo json_encode($x);
|
||||
killme();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue