Skip to content

Instantly share code, notes, and snippets.

@herbdool
Created April 17, 2015 02:58
Show Gist options
  • Save herbdool/da8c263167005b98e41a to your computer and use it in GitHub Desktop.
Save herbdool/da8c263167005b98e41a to your computer and use it in GitHub Desktop.
diff --git a/CRM/Extension/Mapper.php b/CRM/Extension/Mapper.php
index f765afb..ac27547 100755
--- a/CRM/Extension/Mapper.php
+++ b/CRM/Extension/Mapper.php
@@ -288,6 +288,10 @@ class CRM_Extension_Mapper {
$moduleExtensions = $this->cache->get($this->cacheKey . '/moduleFiles');
}
+ if ($fresh == 'NOCACHE') {
+ $moduleExtensions = NULL;
+ }
+
if (!is_array($moduleExtensions)) {
// Check canonical module list
$moduleExtensions = array();
diff --git a/CRM/Extension/System.php b/CRM/Extension/System.php
index 1e09e10..dcc9a50 100644
--- a/CRM/Extension/System.php
+++ b/CRM/Extension/System.php
@@ -84,7 +84,7 @@ class CRM_Extension_System {
* Missing values will be guessed based on $config.
*/
public function __construct($parameters = array()) {
- $config = CRM_Core_Config::singleton();
+ $config = CRM_Core_Config::singleton(FALSE);
$configKeys = array(
'extensionsDir',
'extensionsURL',
diff --git a/CRM/Utils/Hook.php b/CRM/Utils/Hook.php
index 915f830..4a8e4bb 100644
--- a/CRM/Utils/Hook.php
+++ b/CRM/Utils/Hook.php
@@ -244,7 +244,7 @@ abstract class CRM_Utils_Hook {
* @param $moduleList
*/
public function requireCiviModules(&$moduleList) {
- $civiModules = CRM_Core_PseudoConstant::getModuleExtensions();
+ $civiModules = CRM_Core_PseudoConstant::getModuleExtensions('NOCACHE');
foreach ($civiModules as $civiModule) {
if (!file_exists($civiModule['filePath'])) {
CRM_Core_Session::setStatus(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment