Skip to content
Snippets Groups Projects
Commit 6d087d5b authored by Dave Greenberg's avatar Dave Greenberg
Browse files

Merge pull request #2237 from lcdservices/CRM-14016

CRM-14016 remove report instance from nav bar
Tested patch, works as expected.
parents 9b6e0408 81583117
No related branches found
No related tags found
No related merge requests found
......@@ -241,7 +241,7 @@ class CRM_Report_Form_Instance {
}
static function postProcess(&$form, $redirect = TRUE) {
$params = $form->getVar('_params');
$params = $form->getVar('_params');
$instanceID = $form->getVar('_id');
if ($isNew = $form->getVar('_createNew')) {
......@@ -254,6 +254,14 @@ class CRM_Report_Form_Instance {
if (CRM_Utils_Array::value('is_navigation', $params)) {
$params['navigation'] = $form->_navigation;
}
else {
//delete navigation if exists
$navId = CRM_Core_DAO::getFieldValue('CRM_Report_DAO_ReportInstance', $instanceID, 'navigation_id', 'id');
if ($navId) {
CRM_Core_BAO_Navigation::processDelete($navId);
CRM_Core_BAO_Navigation::resetNavigation();
}
}
// make a copy of params
$formValues = $params;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment