Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

Commit

Permalink
Conditionally disable explorer menu item
Browse files Browse the repository at this point in the history
  • Loading branch information
colemanw committed Sep 17, 2019
1 parent 11e3907 commit 0b1115d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions CRM/Api4/Upgrader.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,14 @@ public function postInstall() {
* Uninstall script
*/
public function uninstall() {
// Remove Api4 Explorer navigation menu item
civicrm_api3('Navigation', 'get', [
'name' => 'Api Explorer v4',
'return' => ['id'],
'api.Navigation.delete' => [],
]);
// Remove Api4 Explorer navigation menu item unless civicrm core includes api4
if (version_compare(CRM_Utils_System::version(), '5.19.alpha1', '<')) {
civicrm_api3('Navigation', 'get', [
'name' => 'Api Explorer v4',
'return' => ['id'],
'api.Navigation.delete' => [],
]);
}
}

/**
Expand Down

0 comments on commit 0b1115d

Please sign in to comment.