X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=ext%2Feventcart%2Feventcart.civix.php;h=09880d0df817dcd4ad5e9a955c7097ecb30955ae;hb=ad4424dd974d51a4ff9f282ff25914a4b3decef2;hp=1e3984685862d4926edc883e5f3d29eee0d110b7;hpb=fb6e7e22aaa0d8e8cae2dd04967ce0d7e30609ec;p=civicrm-core.git diff --git a/ext/eventcart/eventcart.civix.php b/ext/eventcart/eventcart.civix.php index 1e39846858..09880d0df8 100644 --- a/ext/eventcart/eventcart.civix.php +++ b/ext/eventcart/eventcart.civix.php @@ -204,46 +204,6 @@ function _eventcart_civix_upgrader() { } } -/** - * Search directory tree for files which match a glob pattern. - * - * Note: Dot-directories (like "..", ".git", or ".svn") will be ignored. - * Note: In Civi 4.3+, delegate to CRM_Utils_File::findFiles() - * - * @param string $dir base dir - * @param string $pattern , glob pattern, eg "*.txt" - * - * @return array - */ -function _eventcart_civix_find_files($dir, $pattern) { - if (is_callable(['CRM_Utils_File', 'findFiles'])) { - return CRM_Utils_File::findFiles($dir, $pattern); - } - - $todos = [$dir]; - $result = []; - while (!empty($todos)) { - $subdir = array_shift($todos); - foreach (_eventcart_civix_glob("$subdir/$pattern") as $match) { - if (!is_dir($match)) { - $result[] = $match; - } - } - if ($dh = opendir($subdir)) { - while (FALSE !== ($entry = readdir($dh))) { - $path = $subdir . DIRECTORY_SEPARATOR . $entry; - if ($entry[0] == '.') { - } - elseif (is_dir($path)) { - $todos[] = $path; - } - } - closedir($dh); - } - } - return $result; -} - /** * Glob wrapper which is guaranteed to return an array. *