X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FEvent%2FForm%2FManageEvent.php;h=a4702ebeb298b3812de048ab5b3f481241d41a5c;hb=a4d42ed6184ae28d52b0273bcb53597b87605f26;hp=acab1e709cae2aead199b27ae8b66a1dcaf16db7;hpb=df5ec56e00e01a5ae8435abd40a590e1898a74f1;p=civicrm-core.git diff --git a/CRM/Event/Form/ManageEvent.php b/CRM/Event/Form/ManageEvent.php index acab1e709c..a4702ebeb2 100644 --- a/CRM/Event/Form/ManageEvent.php +++ b/CRM/Event/Form/ManageEvent.php @@ -1,9 +1,9 @@ _id = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE, NULL, 'GET'); if ($this->_id) { $this->assign('eventId', $this->_id); - if (empty($this->_addProfileBottom) && empty($this->_addProfileBottomAdd)) { + if (!empty($this->_addBlockName) && empty($this->_addProfileBottom) && empty($this->_addProfileBottomAdd)) { $this->add('hidden', 'id', $this->_id); } $this->_single = TRUE; @@ -213,7 +213,7 @@ class CRM_Event_Form_ManageEvent extends CRM_Core_Form { * * @access public * - * @return None + * @return void */ function setDefaultValues() { $defaults = array(); @@ -241,7 +241,7 @@ class CRM_Event_Form_ManageEvent extends CRM_Core_Form { /** * Function to build the form * - * @return None + * @return void * @access public */ public function buildQuickForm() { @@ -338,7 +338,7 @@ class CRM_Event_Form_ManageEvent extends CRM_Core_Form { } CRM_Core_Session::setStatus(ts("'%1' information has been saved.", - array(1 => ($subPage == 'friend') ? 'Friend' : $className) + array(1 => CRM_Utils_Array::value('title', CRM_Utils_Array::value($subPage, $this->get('tabHeader')), $className)) ), ts('Saved'), 'success'); $config = CRM_Core_Config::singleton(); @@ -353,29 +353,25 @@ class CRM_Event_Form_ManageEvent extends CRM_Core_Form { $this->postProcessHook(); if ($this->controller->getButtonName('submit') == "_qf_{$className}_upload_done") { if ($this->_isTemplate) { - CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/admin/eventTemplate', - 'reset=1' - )); + CRM_Core_Session::singleton()->pushUserContext(CRM_Utils_System::url('civicrm/admin/eventTemplate', 'reset=1')); } else { - CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/event/manage', - 'reset=1' - )); + CRM_Core_Session::singleton()->pushUserContext(CRM_Utils_System::url('civicrm/event/manage', 'reset=1')); } } else { - CRM_Utils_System::redirect(CRM_Utils_System::url("civicrm/event/manage/{$subPage}", + CRM_Core_Session::singleton()->pushUserContext(CRM_Utils_System::url("civicrm/event/manage/{$subPage}", "action=update&reset=1&id={$this->_id}" )); } } } + /** + * @return string + */ function getTemplateFileName() { - if ($this->controller->getPrint() == CRM_Core_Smarty::PRINT_NOFORM || - $this->getVar('_id') <= 0 || - ($this->_action & CRM_Core_Action::DELETE) - ) { + if ($this->controller->getPrint() || $this->getVar('_id') <= 0 || $this->_action & CRM_Core_Action::DELETE) { return parent::getTemplateFileName(); } else {