From: 19ATF72 Date: Tue, 5 Dec 2023 22:38:07 +0000 (-0800) Subject: Fix ID retrieval for MailingComponent edit page X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5ea119d080501f90e4debb570bd5117e7545f9d3;p=civicrm-core.git Fix ID retrieval for MailingComponent edit page --- diff --git a/CRM/Mailing/DAO/MailingComponent.php b/CRM/Mailing/DAO/MailingComponent.php index 1a0b2001d1..5c21777431 100644 --- a/CRM/Mailing/DAO/MailingComponent.php +++ b/CRM/Mailing/DAO/MailingComponent.php @@ -37,8 +37,9 @@ class CRM_Mailing_DAO_MailingComponent extends CRM_Core_DAO { * @var string[] */ protected static $_paths = [ - 'add' => 'civicrm/admin/component?action=add&reset=1', - 'update' => 'civicrm/admin/component?action=update&id=[id]&reset=1', + 'add' => 'civicrm/admin/component/edit?action=add&reset=1', + 'update' => 'civicrm/admin/component/edit?action=update&id=[id]&reset=1', + 'browse' => 'civicrm/admin/component?action=browse&id=[id]&reset=1', ]; /** diff --git a/CRM/Mailing/Form/Component.php b/CRM/Mailing/Form/Component.php index 660d0a8e1b..603317c7b5 100644 --- a/CRM/Mailing/Form/Component.php +++ b/CRM/Mailing/Form/Component.php @@ -35,8 +35,7 @@ class CRM_Mailing_Form_Component extends CRM_Core_Form { protected $_BAOName; public function preProcess() { - $this->_id = $this->get('id'); - $this->_BAOName = $this->get('BAOName'); + $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this); } /** @@ -94,8 +93,7 @@ class CRM_Mailing_Form_Component extends CRM_Core_Form { if (isset($this->_id)) { $params = ['id' => $this->_id]; - $baoName = $this->_BAOName; - $baoName::retrieve($params, $defaults); + CRM_Mailing_BAO_MailingComponent::retrieve($params, $defaults); } else { $defaults['is_active'] = 1; diff --git a/CRM/Mailing/xml/Menu/Mailing.xml b/CRM/Mailing/xml/Menu/Mailing.xml index 3067227861..f3267235d3 100644 --- a/CRM/Mailing/xml/Menu/Mailing.xml +++ b/CRM/Mailing/xml/Menu/Mailing.xml @@ -28,6 +28,15 @@ CiviMail 410 + + civicrm/admin/component/edit + Headers, Footers, and Automated Messages + CRM_Mailing_Form_Component + Configure the header and footer used for mailings. Customize the content of automated Subscribe, Unsubscribe, Resubscribe and Opt-out messages. + access CiviCRM,access CiviMail + CiviMail + 411 + civicrm/admin/options/from_email_address/civimail From Email Addresses diff --git a/xml/schema/Mailing/MailingComponent.xml b/xml/schema/Mailing/MailingComponent.xml index 7ef2d0e0c8..a35b61d07c 100644 --- a/xml/schema/Mailing/MailingComponent.xml +++ b/xml/schema/Mailing/MailingComponent.xml @@ -7,8 +7,9 @@ Stores information about the mailing components (header/footer). CiviMail - civicrm/admin/component?action=add&reset=1 - civicrm/admin/component?action=update&id=[id]&reset=1 + civicrm/admin/component/edit?action=add&reset=1 + civicrm/admin/component/edit?action=update&id=[id]&reset=1 + civicrm/admin/component?action=browse&id=[id]&reset=1 id