Changeset 12442

Show
Ignore:
Timestamp:
02/14/08 10:54:40 (11 months ago)
Author:
pottedmeat
Message:

Refs #5602. Make sure that cron conflicts don't happen so that I can show the cron to phiggins

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • util/branches/dev/jsdoc/jsdoc.module

    r12441 r12442  
    413413  if (_jsdoc_cron_validate_include()) { 
    414414    $files = variable_get('jsdoc_cron_files', array()); 
     415    $limit = 25; 
    415416    if (!empty($files)) { 
    416417      call_user_func(_jsdoc_base() . '_get_files'); 
     
    424425      $files = call_user_func(_jsdoc_base() . '_get_files'); 
    425426    } 
     427 
     428    if(count($files) <= $limit){ 
     429      variable_set('jsdoc_cron_files', array()); 
     430    }else{ 
     431      variable_set('jsdoc_cron_files', array_slice($files, $limit)); 
     432    } 
     433 
    426434    if (!is_array($files)) { 
    427435      watchdog('jsdoc', _jsdoc_base() . '_get_files' . t(' does not return an array in ') . _jsdoc_file_location(), WATCHDOG_ERROR); 
     
    441449 
    442450      $count = 0; 
    443       $limit = 25; 
    444451      foreach ($files as $list) { 
    445452        if($count == $limit){ 
    446           if(count($files) <= $limit){ 
    447             variable_set('jsdoc_cron_files', array()); 
    448           }else{ 
    449             variable_set('jsdoc_cron_files', array_slice($files, $limit)); 
    450           } 
    451453          break; 
    452454        }