Skip to content

Commit

Permalink
Extensions - Within civicrm-core, only search the 'ext' and 'tools' f…
Browse files Browse the repository at this point in the history
…olders.
  • Loading branch information
totten committed Sep 9, 2022
1 parent c5c3f6b commit ce8586a
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions CRM/Extension/System.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
class CRM_Extension_System {

public const DEFAULT_MAX_DEPTH = 4;
public const DEFAULT_MAX_DEPTH = 3;

private static $singleton;

Expand Down Expand Up @@ -119,13 +119,18 @@ public function getFullContainer() {
$containers['default'] = $this->getDefaultContainer();
}

$containers['civiroot'] = new CRM_Extension_Container_Basic(
$this->parameters['civicrm_root'],
$this->parameters['resourceBase'],
$this->getCache(),
'civiroot',
$this->parameters['maxDepth']
);
$civiSubDirs = defined('CIVICRM_TEST')
? ['ext', 'tools', 'tests']
: ['ext', 'tools'];
foreach ($civiSubDirs as $civiSubDir) {
$containers["civicrm_$civiSubDir"] = new CRM_Extension_Container_Basic(
CRM_Utils_File::addTrailingSlash($this->parameters['civicrm_root']) . $civiSubDir,
CRM_Utils_File::addTrailingSlash($this->parameters['resourceBase'], '/') . $civiSubDir,
$this->getCache(),
"civicrm_$civiSubDir",
$this->parameters['maxDepth']
);
}

// TODO: CRM_Extension_Container_Basic( /sites/all/modules )
// TODO: CRM_Extension_Container_Basic( /sites/$domain/modules
Expand Down

0 comments on commit ce8586a

Please sign in to comment.