From: Eileen McNaughton Date: Thu, 17 Aug 2023 23:24:39 +0000 (+1200) Subject: Fix undeclared property - use locally scoped variable X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=16eeba350d96c66a9aa7a249a041ad2866648b4c;p=civicrm-core.git Fix undeclared property - use locally scoped variable --- diff --git a/CRM/Event/Form/ManageEvent.php b/CRM/Event/Form/ManageEvent.php index 6eed43ce9d..1059d3ce40 100644 --- a/CRM/Event/Form/ManageEvent.php +++ b/CRM/Event/Form/ManageEvent.php @@ -191,35 +191,28 @@ class CRM_Event_Form_ManageEvent extends CRM_Core_Form { // Set Done button URL and breadcrumb. Templates go back to Manage Templates, // otherwise go to Manage Event for new event or ManageEventEdit if event if exists. - $breadCrumb = []; if (!$this->_isTemplate) { + $breadCrumb = ['title' => ts('Manage Events')]; if ($this->_id) { - $this->_doneUrl = CRM_Utils_System::url(CRM_Utils_System::currentPath(), + $breadCrumb['url'] = CRM_Utils_System::url(CRM_Utils_System::currentPath(), "action=update&reset=1&id={$this->_id}" ); } else { - $this->_doneUrl = CRM_Utils_System::url('civicrm/event/manage', + $breadCrumb['url'] = CRM_Utils_System::url('civicrm/event/manage', 'reset=1' ); - $breadCrumb = [ - [ - 'title' => ts('Manage Events'), - 'url' => $this->_doneUrl, - ], - ]; } + CRM_Utils_System::appendBreadCrumb($breadCrumb); } else { - $this->_doneUrl = CRM_Utils_System::url('civicrm/admin/eventTemplate', 'reset=1'); - $breadCrumb = [ + CRM_Utils_System::appendBreadCrumb([ [ 'title' => ts('Manage Event Templates'), - 'url' => $this->_doneUrl, + 'url' => CRM_Utils_System::url('civicrm/admin/eventTemplate', 'reset=1'), ], - ]; + ]); } - CRM_Utils_System::appendBreadCrumb($breadCrumb); } /**