From: Jagadedes Date: Mon, 20 Oct 2014 10:56:38 +0000 (+0530) Subject: #29758 removed extra path for redirect X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b22be3dc8288aee41e7a3a96fe6f9619a87d1608;p=com.zyxware.civiwci.git #29758 removed extra path for redirect --- 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) {