Skip to content

Commit

Permalink
Re-generate civix
Browse files Browse the repository at this point in the history
  • Loading branch information
agileware-justin committed Oct 24, 2021
1 parent 35e9994 commit 60711d3
Showing 1 changed file with 6 additions and 30 deletions.
36 changes: 6 additions & 30 deletions civiquickbooks.civix.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
* extension.
*/
class CRM_Civiquickbooks_ExtensionUtil {
const SHORT_NAME = "civiquickbooks";
const LONG_NAME = "au.com.agileware.civiquickbooks";
const CLASS_PREFIX = "CRM_Civiquickbooks";
const SHORT_NAME = 'civiquickbooks';
const LONG_NAME = 'au.com.agileware.civiquickbooks';
const CLASS_PREFIX = 'CRM_Civiquickbooks';

/**
* Translate a string using the extension's domain.
Expand Down Expand Up @@ -221,40 +221,16 @@ function _civiquickbooks_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()
* Note: Delegate to CRM_Utils_File::findFiles(), this function kept only
* for backward compatibility of extension code that uses it.
*
* @param string $dir base dir
* @param string $pattern , glob pattern, eg "*.txt"
*
* @return array
*/
function _civiquickbooks_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 (_civiquickbooks_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;
return CRM_Utils_File::findFiles($dir, $pattern);
}

/**
Expand Down

0 comments on commit 60711d3

Please sign in to comment.