CRM-20498, removed code from run() since its been invoked in parent function
authorPradeep Nayak <pradpnayak@gmail.com>
Fri, 28 Apr 2017 14:29:34 +0000 (19:59 +0530)
committerPradeep Nayak <pradpnayak@gmail.com>
Fri, 28 Apr 2017 14:29:34 +0000 (19:59 +0530)
----------------------------------------
* CRM-20498: buildform hook invoked twice
  https://issues.civicrm.org/jira/browse/CRM-20498

CRM/Financial/Page/FinancialAccount.php
CRM/Financial/Page/FinancialBatch.php
CRM/Financial/Page/FinancialType.php

index 3bfe8862a2b6c3d9ee8b2ea2d36b596978052289..0d4718b6e2883fcd7a447f70f42e04be935b436b 100644 (file)
@@ -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.
    */
index 17b9cf84b7ef00c1d862a91a1855251e0c5646f3..bf3da74b7aec937fc24e812d49aaf943f4e6b102 100644 (file)
@@ -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();
   }
index 7d3ff037d8020915e8df98dc381d619ab86c4b8c..53d31b84b674e10358f93af7889d12e866cd350d 100644 (file)
@@ -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.
    */