Merge pull request #23156 from eileenmcnaughton/pppro
[civicrm-core.git] / mixin / mgd-php@1 / mixin.php
index 39d45b14abcfbd711b4594c72293dca7b49069e5..676860848ea1b2a030fb6151fc7d8dfa7e65c608 100644 (file)
@@ -23,6 +23,10 @@ return function ($mixInfo, $bootCache) {
       return;
     }
 
+    if (is_array($event->modules) && !in_array($mixInfo->longName, $event->modules, TRUE)) {
+      return;
+    }
+
     $mgdFiles = CRM_Utils_File::findFiles($mixInfo->getPath(), '*.mgd.php');
     sort($mgdFiles);
     foreach ($mgdFiles as $file) {