diff --git a/includes/session.inc b/includes/session.inc index 84d1983..ac8fce3 100644 --- a/includes/session.inc +++ b/includes/session.inc @@ -163,7 +163,7 @@ function _drupal_session_write($sid, $value) { try { if (!drupal_save_session()) { // We don't have anything to do if we are not allowed to save the session. - return; + return FALSE; } // Check whether $_SESSION has been changed in this request. @@ -231,6 +231,7 @@ function _drupal_session_write($sid, $value) { } return FALSE; } + return TRUE; } /** @@ -271,6 +272,7 @@ function drupal_session_initialize() { } } date_default_timezone_set(drupal_get_user_timezone()); + return TRUE; } /** @@ -292,6 +294,7 @@ function drupal_session_start() { $_SESSION += $session_data; } } + return TRUE; } /** @@ -304,7 +307,7 @@ function drupal_session_commit() { if (!drupal_save_session()) { // We don't have anything to do if we are not allowed to save the session. - return; + return FALSE; } if (empty($user->uid) && empty($_SESSION)) { @@ -329,6 +332,7 @@ function drupal_session_commit() { // Write the session data. session_write_close(); } + return TRUE; } /** @@ -351,7 +355,7 @@ function drupal_session_regenerate() { global $user, $is_https; // Nothing to do if we are not allowed to change the session. if (!drupal_save_session()) { - return; + return FALSE; } if ($is_https && variable_get('https', FALSE)) { @@ -410,6 +414,7 @@ function drupal_session_regenerate() { $user = $account; } date_default_timezone_set(drupal_get_user_timezone()); + return TRUE; } /** @@ -425,7 +430,7 @@ function _drupal_session_destroy($sid) { // Nothing to do if we are not allowed to change the session. if (!drupal_save_session()) { - return; + return FALSE; } // Delete session data. @@ -446,6 +451,7 @@ function _drupal_session_destroy($sid) { elseif (variable_get('https', FALSE)) { _drupal_session_delete_cookie('S' . session_name(), TRUE); } + return TRUE; } /** @@ -466,6 +472,7 @@ function _drupal_session_delete_cookie($name, $secure = NULL) { setcookie($name, '', REQUEST_TIME - 3600, $params['path'], $params['domain'], $params['secure'], $params['httponly']); unset($_COOKIE[$name]); } + return TRUE; } /** @@ -477,12 +484,14 @@ function _drupal_session_delete_cookie($name, $secure = NULL) { function drupal_session_destroy_uid($uid) { // Nothing to do if we are not allowed to change the session. if (!drupal_save_session()) { - return; + return FALSE; } db_delete('sessions') ->condition('uid', $uid) ->execute(); + + return TRUE; } /**