function runFilesInDir ($directory) { $directory_handle = opendir($directory); $do = false; while (false !== ($entry = readdir($directory_handle))) { if ( $entry != '.' and $entry != '..' and !mb_stristr($entry,'CVSROOT') and !mb_stristr($entry,'lib') and !mb_stristr($entry,'TestSource') and !mb_stristr($entry,'var') and !mb_stristr($entry,'CVS') and is_dir($directory.'/'.$entry) ) { $do = $do or runFilesInDir($directory.'/'.$entry); } elseif (is_file($directory.'/'.$entry) and preg_match('~\.php$~u',$entry)) { $do = $do or del_dos_line_feeds($directory.'/'.$entry); } } return $do; }
function runFilesInDir ($directory) { $directory_handle = opendir($directory); $error = array(); while (false !== ($entry = readdir($directory_handle))) { if ( $entry != '.' and $entry != '..' and !mb_stristr($entry,'CVSROOT') and !mb_stristr($entry,'lib') and !mb_stristr($entry,'TestSource') and !mb_stristr($entry,'var') and !mb_stristr($entry,'CVS') and is_dir($directory.'/'.$entry) ) { $error = array_merge($error,runFilesInDir($directory.'/'.$entry)); } elseif (is_file($directory.'/'.$entry) and preg_match('~\.php$~u',$entry)) { $error = array_merge($error,check_syntax($directory.'/'.$entry)); } } return $error; }