Standards: add braces

(thanks @Hypolite)
This commit is contained in:
Sandro Santilli 2017-03-13 23:09:09 +01:00
parent 8517ba1fab
commit 0b46a5f935

View file

@ -21,15 +21,18 @@ function cookie_hash($user) {
*/ */
function new_cookie($time, $user = array()) { function new_cookie($time, $user = array()) {
if ($time != 0) if ($time != 0) {
$time = $time + time(); $time = $time + time();
}
if ($user) if ($user) {
$value = json_encode(array("uid" => $user["uid"], $value = json_encode(array("uid" => $user["uid"],
"hash" => cookie_hash($user), "hash" => cookie_hash($user),
"ip" => $_SERVER['REMOTE_ADDR'])); "ip" => $_SERVER['REMOTE_ADDR']));
else }
else {
$value = ""; $value = "";
}
setcookie("Friendica", $value, $time, "/", "", setcookie("Friendica", $value, $time, "/", "",
(get_config('system', 'ssl_policy') == SSL_POLICY_FULL), true); (get_config('system', 'ssl_policy') == SSL_POLICY_FULL), true);