From 9194bdb32f8aed4fcb3724d3c9b22b7179f0d8e4 Mon Sep 17 00:00:00 2001 From: Herb vd Dool Date: Sun, 6 Oct 2019 16:19:14 -0400 Subject: [PATCH] only store full_name but still make it backwards compatible --- CRM/Extension/Mapper.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CRM/Extension/Mapper.php b/CRM/Extension/Mapper.php index fd828e4fe7..3aeb3a2825 100644 --- a/CRM/Extension/Mapper.php +++ b/CRM/Extension/Mapper.php @@ -304,7 +304,7 @@ class CRM_Extension_Mapper { try { $moduleExtensions[] = [ 'prefix' => $dao->file, - 'filePath' => $this->keyToPath($dao->full_name), + 'filePath' => $dao->full_name, ]; } catch (CRM_Extension_Exception $e) { @@ -323,6 +323,12 @@ class CRM_Extension_Mapper { $this->cache->set($this->cacheKey . '_moduleFiles', $moduleExtensions); } } + + // Since we're not caching the full path we add it now. + array_walk($moduleExtensions, function(&$value, $key) { + $value['filePath'] = $this->keyToPath($value['filePath']); + }); + return $moduleExtensions; } -- 2.25.1