X-Git-Url: https://dev.renevier.net/gitweb.cgi?p=syp.git;a=blobdiff_plain;f=logout.php;h=037252c4aee89bc43dd386dc4ba9bae79eebaa1b;hp=25d55a9878117932ee600ba16e0772d038993f3c;hb=4414f33ecd172ea188660a45c8d8fb3469416d4f;hpb=b6cae6a5698c5d0655d921f78f0ccab470bf034c diff --git a/logout.php b/logout.php index 25d55a9..037252c 100644 --- a/logout.php +++ b/logout.php @@ -6,7 +6,12 @@ if (!@include_once ("./inc/settings.php")) { header ('Location: index.php'); } -setcookie (sprintf ("%sauth", DBPREFIX), "", time () - 3600, "" , "",false, true); -setcookie (sprintf ("%suser", DBPREFIX), "", time () - 3600, "" , "",false, true); +if (version_compare (PHP_VERSION, '5.2.0', '>=')) { + setcookie (sprintf ("%sauth", DBPREFIX), "", time () - 3600, "" , "",false, true); + setcookie (sprintf ("%suser", DBPREFIX), "", time () - 3600, "" , "",false, true); +} else { + setcookie (sprintf ("%sauth", DBPREFIX), "", time () - 3600, "" , "",false); + setcookie (sprintf ("%suser", DBPREFIX), "", time () - 3600, "" , "",false); +} header ('Location: index.php'); ?>