? drupal_cron-19173-32-axyjo.patch
? drupal_cron-19173-34-axyjo.patch
? drupal_cron-19173-36-axyjo.patch
? old-patch.patch
? sites/default/files
? sites/default/settings.php
Index: cron.php
===================================================================
RCS file: /cvs/drupal/drupal/cron.php,v
retrieving revision 1.40
diff -r1.40 cron.php
6a7,8
>  * Takes one parameter, include or exclude, which contains a comma separated
>  * list of modules to either include or exclude from the cron run.
17c19,39
<   drupal_cron_run();
---
>   if (isset($_GET['include'])) $include = $_GET['include'];
>   if (isset($_GET['exclude'])) $exclude = $_GET['exclude'];
> 
>   if (isset($include) && isset($exclude)) {
>     watchdog('cron', t('Cron has been issued both the include and the exclude parameters.'), array(), WATCHDOG_ERROR);
>     return false;
>   }
>   elseif (isset($include) && !isset($exclude)) {
>     $cron_param = $include;
>     $mode = 'include';
>   }
>   elseif (!isset($include) && isset($exclude)) {
>     $cron_param = $exclude;
>     $mode = 'exclude';
>   }
>   else {
>     $cron_param = '';
>     $mode = '';
>   }
> 
>   drupal_cron_run($cron_param, $mode);
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.848
diff -r1.848 common.inc
3003c3003
< function drupal_cron_run() {
---
> function drupal_cron_run($list = '', $mode = '', $delimiter = ',') {
3032a3033,3035
>     
>     // Create $cron_message so that it is defined.
>     $cron_message = '';
3035c3038,3082
<     module_invoke_all('cron');
---
>     if ($list == '' && $mode == '') {
>       // No parameters were passed, so we're running all modules
>       module_invoke_all('cron');
>       watchdog('cron', t('Cron run completed for all modules.'), array(), WATCHDOG_NOTICE);
>     }
>     elseif($list != '' && $mode == 'include') {
>       $module_list = module_list();
>       $cron_modules = explode($delimiter, $list);
>       // Get only a list of modules that are specified AND enabled
>       $run_array = array_intersect($module_list, $cron_modules);
>       foreach($run_array as $run_module) {
> 	      module_invoke($run_module, 'cron');
>       	$cron_message .= t($run_module).', ';
>       }
>       // Remove the extra ', ' from the end of the string
>       $cron_message = substr($cron_message, 0, -2);
>       if ($cron_message != '') {
>         watchdog('cron', t('Cron run completed for modules: @cron_message.', array('@cron_message' => $cron_message)), array(), WATCHDOG_NOTICE);
>       }
>       else {
>         watchdog('cron', t('Cron did not run because no valid modules were specified.'), array(), WATCHDOG_ERROR);
>       }
>     }
>     elseif($list != '' && $mode == 'exclude') {
>       $module_list = module_list();
>       $cron_modules = explode($delimiter, $list);
>       // Get only a list of modules that are NOT specified but enabled.
>       $run_array = array_diff($module_list, $cron_modules);
>       foreach($run_array as $run_module) {
>         module_invoke($run_module, 'cron');
>       	$cron_message .= t($run_module).', ';
>       }
>       // Remove the extra ', ' from the end of the string
>       $cron_message = substr($cron_message, 0, -2);
>       if ($cron_message != '') {
>         watchdog('cron', t('Cron run completed for modules: @cron_message.', array('@cron_message' => $cron_message)), array(), WATCHDOG_NOTICE);
>       }
>       else {
>         watchdog('cron', t('Cron did not run because no valid modules were specified.'), array(), WATCHDOG_ERROR);
>       }
>     }
>     else {
>       // Catch anything that's not covered already.
>       return false;
>     }
3039d3085
<     watchdog('cron', 'Cron run completed.', array(), WATCHDOG_NOTICE);
Index: modules/system/system.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.test,v
retrieving revision 1.36
diff -r1.36 system.test
282a283,290
>     
>     // Run cron with an include parameter.
>     $this->drupalGet($base_url . '/cron.php', array('external' => TRUE, 'query' => array('cron_key' => $key, 'include' => 'system')));
>     $this->assertResponse(200);
>     
>     // Run cron with an exclude parameter.
>     $this->drupalGet($base_url . '/cron.php', array('external' => TRUE, 'query' => array('cron_key' => $key, 'exclude' => 'system')));
>     $this->assertResponse(200);
