MDL-13623 proper version detection

This commit is contained in:
skodak
2008-02-26 18:33:22 +00:00
parent 997dc05600
commit 13db6cc1e4
2 changed files with 4 additions and 7 deletions
+2 -4
View File
@@ -517,8 +517,7 @@ global $HTTPSPAGEREQUIRED;
if (empty($nomoodlecookie)) {
session_name('MoodleSession'.$CFG->sessioncookie);
if (function_exists('array_fill_keys')) {
//PHP 5.2.0
if (check_php_version('5.2.0')) {
session_set_cookie_params(0, $CFG->sessioncookiepath, '', $CFG->cookiesecure, $CFG->cookiehttponly);
} else {
session_set_cookie_params(0, $CFG->sessioncookiepath, '', $CFG->cookiesecure);
@@ -530,8 +529,7 @@ global $HTTPSPAGEREQUIRED;
if (!empty($_COOKIE['MoodleSessionTest'.$CFG->sessioncookie])) {
$_SESSION['SESSION']->has_timed_out = true;
}
if (function_exists('array_fill_keys')) {
//PHP 5.2.0
if (check_php_version('5.2.0')) {
setcookie('MoodleSessionTest'.$CFG->sessioncookie, $_SESSION['SESSION']->session_test, 0, $CFG->sessioncookiepath, '', $CFG->cookiesecure, $CFG->cookiehttponly);
} else {
setcookie('MoodleSessionTest'.$CFG->sessioncookie, $_SESSION['SESSION']->session_test, 0, $CFG->sessioncookiepath, '', $CFG->cookiesecure);