mirror of
https://github.com/friendica/friendica
synced 2024-12-23 08:00:16 +00:00
Standards: add braces
(thanks @Hypolite)
This commit is contained in:
parent
8517ba1fab
commit
0b46a5f935
1 changed files with 6 additions and 3 deletions
|
@ -21,15 +21,18 @@ function cookie_hash($user) {
|
|||
*/
|
||||
function new_cookie($time, $user = array()) {
|
||||
|
||||
if ($time != 0)
|
||||
if ($time != 0) {
|
||||
$time = $time + time();
|
||||
}
|
||||
|
||||
if ($user)
|
||||
if ($user) {
|
||||
$value = json_encode(array("uid" => $user["uid"],
|
||||
"hash" => cookie_hash($user),
|
||||
"ip" => $_SERVER['REMOTE_ADDR']));
|
||||
else
|
||||
}
|
||||
else {
|
||||
$value = "";
|
||||
}
|
||||
|
||||
setcookie("Friendica", $value, $time, "/", "",
|
||||
(get_config('system', 'ssl_policy') == SSL_POLICY_FULL), true);
|
||||
|
|
Loading…
Reference in a new issue