#29758 removed extra path for redirect
authorJagadedes <jagadees.pillai@zyxware.com>
Mon, 20 Oct 2014 10:56:38 +0000 (16:26 +0530)
committerJagadedes <jagadees.pillai@zyxware.com>
Mon, 20 Oct 2014 10:56:38 +0000 (16:26 +0530)
CRM/Wci/Form/CreateWidget.php

index bc114f0757b1a62ced657d8335a0d3a86e263352..0b8273a1418d149b587164adaaf0c3b8a8889237 100644 (file)
@@ -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) {