From f420a9cce17926345bd8fdb9cdde8918564911d9 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Fri, 28 Apr 2017 19:59:34 +0530 Subject: [PATCH] CRM-20498, removed code from run() since its been invoked in parent function ---------------------------------------- * CRM-20498: buildform hook invoked twice https://issues.civicrm.org/jira/browse/CRM-20498 --- CRM/Financial/Page/FinancialAccount.php | 24 ------------------------ CRM/Financial/Page/FinancialBatch.php | 13 ------------- CRM/Financial/Page/FinancialType.php | 24 ------------------------ 3 files changed, 61 deletions(-) diff --git a/CRM/Financial/Page/FinancialAccount.php b/CRM/Financial/Page/FinancialAccount.php index 3bfe8862a2..0d4718b6e2 100644 --- a/CRM/Financial/Page/FinancialAccount.php +++ b/CRM/Financial/Page/FinancialAccount.php @@ -90,30 +90,6 @@ class CRM_Financial_Page_FinancialAccount extends CRM_Core_Page_Basic { return self::$_links; } - /** - * Run the page. - * - * This method is called after the page is created. It checks for the - * type of action and executes that action. - * Finally it calls the parent's run method. - */ - public function run() { - // get the requested action - $action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse'); // default to 'browse' - - // assign vars to templates - $this->assign('action', $action); - $id = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE, 0); - - // what action to take ? - if ($action & (CRM_Core_Action::UPDATE | CRM_Core_Action::ADD)) { - $this->edit($action, $id); - } - - // parent run - return parent::run(); - } - /** * Browse all custom data groups. */ diff --git a/CRM/Financial/Page/FinancialBatch.php b/CRM/Financial/Page/FinancialBatch.php index 17b9cf84b7..bf3da74b7a 100644 --- a/CRM/Financial/Page/FinancialBatch.php +++ b/CRM/Financial/Page/FinancialBatch.php @@ -76,19 +76,6 @@ class CRM_Financial_Page_FinancialBatch extends CRM_Core_Page_Basic { public function run() { $context = CRM_Utils_Request::retrieve('context', 'String', $this); $this->set("context", $context); - // assign vars to templates - $id = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE, 0); - $action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse'); // default to 'browse' - - // what action to take ? - if ($action & (CRM_Core_Action::UPDATE | - CRM_Core_Action::ADD | - CRM_Core_Action::CLOSE | - CRM_Core_Action::REOPEN | - CRM_Core_Action::EXPORT) - ) { - $this->edit($action, $id); - } // parent run return parent::run(); } diff --git a/CRM/Financial/Page/FinancialType.php b/CRM/Financial/Page/FinancialType.php index 7d3ff037d8..53d31b84b6 100644 --- a/CRM/Financial/Page/FinancialType.php +++ b/CRM/Financial/Page/FinancialType.php @@ -96,30 +96,6 @@ class CRM_Financial_Page_FinancialType extends CRM_Core_Page_Basic { return self::$_links; } - /** - * Run the page. - * - * This method is called after the page is created. It checks for the - * type of action and executes that action. - * Finally it calls the parent's run method. - */ - public function run() { - // get the requested action - $action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse'); // default to 'browse' - - // assign vars to templates - $this->assign('action', $action); - $id = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE, 0); - - // what action to take ? - if ($action & (CRM_Core_Action::UPDATE | CRM_Core_Action::ADD)) { - $this->edit($action, $id); - } - - // parent run - return parent::run(); - } - /** * Browse all financial types. */ -- 2.25.1