From b22be3dc8288aee41e7a3a96fe6f9619a87d1608 Mon Sep 17 00:00:00 2001 From: Jagadedes Date: Mon, 20 Oct 2014 16:26:38 +0530 Subject: [PATCH] #29758 removed extra path for redirect --- CRM/Wci/Form/CreateWidget.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CRM/Wci/Form/CreateWidget.php b/CRM/Wci/Form/CreateWidget.php index bc114f0..0b8273a 100644 --- a/CRM/Wci/Form/CreateWidget.php +++ b/CRM/Wci/Form/CreateWidget.php @@ -304,10 +304,11 @@ where w.id=" . $this->_id; $transaction->commit(); if(isset($_REQUEST['_qf_CreateWidget_next'])) { - $widget_id = CRM_Core_DAO::singleValueQuery('SELECT LAST_INSERT_ID()'); - CRM_Utils_System::redirect('civicrm/wci/widget?action=update&reset=1&id=' . $widget_id); + (isset($this->_id)) ? $widget_id = $this->_id : + $widget_id = CRM_Core_DAO::singleValueQuery('SELECT LAST_INSERT_ID()'); + CRM_Utils_System::redirect('?action=update&reset=1&id=' . $widget_id); } else { - CRM_Utils_System::redirect('civicrm/wci/widget?reset=1'); + CRM_Utils_System::redirect('?reset=1'); } } catch (Exception $e) { -- 2.25.1