Changeset 13120 for modules

Show
Ignore:
Timestamp:
12/26/11 07:13:37 (1 year ago)
Author:
mbrevda
Message:

upstream updates

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.10/package.php

    r13111 r13120  
    155155  } 
    156156   
    157   //check php files for syntax errors 
    158   $bail = false; 
    159   $files = package_scandirr($tar_dir, true, $file_scan_exclude_list); 
    160   foreach ($files as $f) { 
    161     if (in_array(pathinfo($f, PATHINFO_EXTENSION), $vars['php_extens'])) { 
    162       if (!run_cmd($vars['php_-l'] . ' ' . $f, $outline, false, true)) { 
    163         echo('syntax error detected in ' . $f . ', ' .  $mod . ' won\'t be packaged' . PHP_EOL); 
    164         $bail=true; // finish scanning all files before bailing 
     157  //check php files for syntax errors if requested 
     158  if ($vars['checkphp']) { 
     159     
     160    //get list of files 
     161    $files = package_scandirr($tar_dir, true, $file_scan_exclude_list); 
     162    foreach ($files as $f) { 
     163      if (in_array(pathinfo($f, PATHINFO_EXTENSION), $vars['php_extens'])) { 
     164        if (!run_cmd($vars['php_-l'] . ' ' . $f, $outline, false, true)) { 
     165          //add errors to array 
     166          $syntaxt_errors[] = 'syntax error detected in ' . $f . ', ' .  $mod . ' won\'t be packaged' . PHP_EOL; 
     167        } 
    165168      } 
    166169    } 
    167   } 
    168   unset($files, $list); 
    169   if ($bail && $vars['checkphp']) { 
    170     echo('syntax error detecteded in ' .  $mod . ' skipping packaging going to next' . PHP_EOL); 
    171     continue; 
    172   } 
     170    unset($files, $list); 
     171     
     172    if (isset($syntaxt_errors)) { 
     173      $final_status[$mod] = implode(PHP_EOL, $syntaxt_errors); 
     174      echo $final_status[$mod]; 
     175      continue; 
     176    } 
     177  } 
     178 
    173179   
    174180  //check in any out standing files 
     
    241247   
    242248  // appears we need to do an svn up here or it fails, maybe because of the propset above? 
    243   run_cmd('svn up ../../release/' . $vars['rver'] . '/' . $filename . ' ' . $mod_dir); 
     249  //Lets reaserch this more, SHMZ hasn't found this nesesary -MB 
     250  //run_cmd('svn up ../../release/' . $vars['rver'] . '/' . $filename . ' ' . $mod_dir); 
    244251 
    245252  //check in new tarball and module.xml