| 1 |
<?php |
<?php |
| 2 |
// $Id: common.inc,v 1.1126 2010/03/09 03:39:44 dries Exp $ |
// $Id: common.inc,v 1.1127 2010/03/11 21:23:05 dries Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 4385 |
// Allow execution to continue even if the request gets canceled. |
// Allow execution to continue even if the request gets canceled. |
| 4386 |
@ignore_user_abort(TRUE); |
@ignore_user_abort(TRUE); |
| 4387 |
|
|
| 4388 |
|
// Prevent session information from being saved while cron is running. |
| 4389 |
|
drupal_save_session(FALSE); |
| 4390 |
|
|
| 4391 |
|
// Force the current user to anonymous to ensure consistent permissions on |
| 4392 |
|
// cron runs. |
| 4393 |
|
$original_user = $GLOBALS['user']; |
| 4394 |
|
$GLOBALS['user'] = drupal_anonymous_user(); |
| 4395 |
|
|
| 4396 |
// Try to allocate enough time to run all the hook_cron implementations. |
// Try to allocate enough time to run all the hook_cron implementations. |
| 4397 |
drupal_set_time_limit(240); |
drupal_set_time_limit(240); |
| 4398 |
|
|
| 4453 |
$queue->deleteItem($item); |
$queue->deleteItem($item); |
| 4454 |
} |
} |
| 4455 |
} |
} |
| 4456 |
|
// Restore the user. |
| 4457 |
|
$GLOBALS['user'] = $original_user; |
| 4458 |
|
drupal_save_session(TRUE); |
| 4459 |
|
|
| 4460 |
return $return; |
return $return; |
| 4461 |
} |
} |
| 4462 |
|
|