Use canonical name in api.afform.get
authorColeman Watts <coleman@civicrm.org>
Tue, 26 Nov 2019 14:39:23 +0000 (09:39 -0500)
committerCiviCRM <info@civicrm.org>
Wed, 16 Sep 2020 02:13:20 +0000 (19:13 -0700)
Names were being munged in the api which led to a mismatch between
filenames and afform names.

ext/afform/core/CRM/Afform/AfformScanner.php

index f7ba60a704b560630b7b1fadc7f1c0b6930ec030..d4a2bef678a347dadcb6d230bab7f664be22fdb6 100644 (file)
@@ -194,7 +194,7 @@ class CRM_Afform_AfformScanner {
 
     foreach ($files as $file) {
       $fileBase = preg_replace(self::FILE_REGEXP, '', $file);
-      $name = _afform_angular_module_name(basename($fileBase));
+      $name = basename($fileBase);
       $formPaths[$name][$priority] = $fileBase;
       ksort($formPaths[$name]);
     }