From 675db1a88dfe6d432fe7aabe37cf91a2a1df81c4 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sat, 15 Jan 2022 15:32:18 -0500 Subject: [PATCH] Remove unreachable, nonsensical code This block of code appears to be unreachable, because the contribution page wizard is never frozen in "view" mode. If it were reachable, it would do nothing sensible, as the button would link to a completely unrelated page (configure custom data) and the link would be broken because it is incorrectly bypassing `CRM_Utils_System::url()`. --- CRM/Contribute/Form/ContributionPage.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/CRM/Contribute/Form/ContributionPage.php b/CRM/Contribute/Form/ContributionPage.php index 96ac569ddd..7cffe46965 100644 --- a/CRM/Contribute/Form/ContributionPage.php +++ b/CRM/Contribute/Form/ContributionPage.php @@ -219,14 +219,6 @@ class CRM_Contribute_Form_ContributionPage extends CRM_Core_Form { } $session->replaceUserContext($this->_cancelURL); - // views are implemented as frozen form - if ($this->_action & CRM_Core_Action::VIEW) { - $this->freeze(); - $this->addElement('xbutton', 'done', ts('Done'), [ - 'type' => 'button', - 'onclick' => "location.href='civicrm/admin/custom/group?reset=1&action=browse'", - ]); - } // don't show option for contribution amounts section if membership price set // this flag is sent to template -- 2.25.1