/[drupal]/drupal/includes/common.inc
ViewVC logotype

Diff of /drupal/includes/common.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1127 by dries, Thu Mar 11 21:23:05 2010 UTC revision 1.1128 by dries, Fri Mar 12 14:20:32 2010 UTC
# Line 1  Line 1 
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
# Line 4385  function drupal_cron_run() { Line 4385  function drupal_cron_run() {
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    
# Line 4445  function drupal_cron_run() { Line 4453  function drupal_cron_run() {
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    

Legend:
Removed from v.1.1127  
changed lines
  Added in v.1.1128

  ViewVC Help
Powered by ViewVC 1.1.6