Issue #1688016 by sun, lucascaro: Fixed drupal_cron_run() unconditionally re-enables writing of the user session.

merge-requests/26/head
webchick 2012-08-18 14:12:09 +02:00
parent 1830054811
commit e5795890a0
1 changed files with 2 additions and 1 deletions

View File

@ -5114,6 +5114,7 @@ function drupal_cron_run() {
@ignore_user_abort(TRUE);
// Prevent session information from being saved while cron is running.
$original_session_saving = drupal_save_session();
drupal_save_session(FALSE);
// Force the current user to anonymous to ensure consistent permissions on
@ -5176,7 +5177,7 @@ function drupal_cron_run() {
}
// Restore the user.
$GLOBALS['user'] = $original_user;
drupal_save_session(TRUE);
drupal_save_session($original_session_saving);
return $return;
}