From 5e04a2d4ab72f7f5d2f94212bb6e71bcb65d6e93 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 24 Sep 2020 14:27:20 -0400 Subject: [PATCH] Afform: code cleanup & remove unused menu item --- ext/afform/core/afform.php | 3 +-- ext/afform/gui/CRM/AfformGui/Upgrader.php | 5 +++-- ext/afform/gui/templates/CRM/AfformGui/Page/Gui.tpl | 0 ext/afform/gui/xml/Menu/afform_gui.xml | 9 --------- 4 files changed, 4 insertions(+), 13 deletions(-) delete mode 100644 ext/afform/gui/templates/CRM/AfformGui/Page/Gui.tpl delete mode 100644 ext/afform/gui/xml/Menu/afform_gui.xml diff --git a/ext/afform/core/afform.php b/ext/afform/core/afform.php index 89c7dc0905..c78170823b 100644 --- a/ext/afform/core/afform.php +++ b/ext/afform/core/afform.php @@ -150,8 +150,7 @@ function afform_civicrm_caseTypes(&$caseTypes) { function afform_civicrm_angularModules(&$angularModules) { _afform_civix_civicrm_angularModules($angularModules); - $afforms = \Civi\Api4\Afform::get() - ->setCheckPermissions(FALSE) + $afforms = \Civi\Api4\Afform::get(FALSE) ->setSelect(['name', 'requires', 'module_name', 'directive_name']) ->execute(); diff --git a/ext/afform/gui/CRM/AfformGui/Upgrader.php b/ext/afform/gui/CRM/AfformGui/Upgrader.php index a421855de1..6b6871c952 100644 --- a/ext/afform/gui/CRM/AfformGui/Upgrader.php +++ b/ext/afform/gui/CRM/AfformGui/Upgrader.php @@ -10,10 +10,11 @@ class CRM_AfformGui_Upgrader extends CRM_AfformGui_Upgrader_Base { // upgrade tasks. They are executed in order (like Drupal's hook_update_N). /** - * Setup navigation item on new installs + * Setup navigation item on new installs. + * + * Note: this path is not in the menu.xml because it is handled by afform */ public function install() { - // $this->executeSqlFile('sql/myinstall.sql'); try { $existing = civicrm_api3('Navigation', 'getcount', [ 'name' => 'afform_gui', diff --git a/ext/afform/gui/templates/CRM/AfformGui/Page/Gui.tpl b/ext/afform/gui/templates/CRM/AfformGui/Page/Gui.tpl deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ext/afform/gui/xml/Menu/afform_gui.xml b/ext/afform/gui/xml/Menu/afform_gui.xml deleted file mode 100644 index b13ee53569..0000000000 --- a/ext/afform/gui/xml/Menu/afform_gui.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - civicrm/admin/afform - CRM_AfformGui_Page_Gui - Gui - access CiviCRM - - -- 2.25.1