function run_files($file) { if (is_link($file)) { return; } if (is_dir($file . '/.')) { $dh = opendir($file); $files = array(); while (false !== ($f = readdir($dh))) { if ($f[0] != '.') { $files[] = $file . '/' . $f; } } closedir($dh); foreach ($files as $f) { run_files($f); } } else { if (basename($file) == __FILE__) { echo "Skipping " . __FILE__ . "\n"; continue; } if (preg_match('/\\.php$/', $file)) { fix_up_file($file); } } }
function run_files($file, $license, $mode_line, $maxlen, $just_show) { if (is_link($file)) { return; } if (is_dir($file . '/.')) { $dh = opendir($file); $files = array(); while (false !== ($f = readdir($dh))) { if ($f[0] != '.') { $files[] = $file . '/' . $f; } } closedir($dh); foreach ($files as $f) { run_files($f, $license, $mode_line, $maxlen, $just_show); } } else { if (preg_match('/\\.php$/', $file)) { fix_up_file($file, $license, $mode_line, $maxlen, $just_show); } } }