Remove redundant function
authorMatthew Wire (MJW Consulting) <mjw@mjwconsult.co.uk>
Wed, 9 Jan 2019 15:27:17 +0000 (15:27 +0000)
committerMatthew Wire (MJW Consulting) <mjw@mjwconsult.co.uk>
Wed, 9 Jan 2019 15:27:17 +0000 (15:27 +0000)
CRM/Member/Page/RecurringContributions.php

index 67b2b93938145ab593879302bde2485075ddf8f9..7567aa3694ad8f00bacafbf96c54d1cf4a270501 100644 (file)
@@ -111,7 +111,7 @@ class CRM_Member_Page_RecurringContributions extends CRM_Core_Page {
    * @param array $recurringContribution
    */
   private function setActionsForRecurringContribution($recurID, &$recurringContribution) {
-    $action = array_sum(array_keys($this->recurLinks($recurID)));
+    $action = array_sum(array_keys(CRM_Contribute_Page_Tab::recurLinks($recurID, 'contribution')));
 
     // no action allowed if it's not active
     $recurringContribution['is_active'] = ($recurringContribution['contribution_status_id'] != 3);
@@ -125,7 +125,7 @@ class CRM_Member_Page_RecurringContributions extends CRM_Core_Page {
       }
 
       $recurringContribution['action'] = CRM_Core_Action::formLink(
-        $this->recurLinks($recurID),
+        CRM_Contribute_Page_Tab::recurLinks($recurID, 'contribution'),
         $action,
         array(
           'cid' => $this->contactID,
@@ -141,19 +141,4 @@ class CRM_Member_Page_RecurringContributions extends CRM_Core_Page {
     }
   }
 
-  /**
-   * This method returns the links that are given for recur search row.
-   * currently the links added for each row are:
-   * - View
-   * - Edit
-   * - Cancel
-   *
-   * @param bool $id
-   *
-   * @return array
-   */
-  private function recurLinks($id) {
-    return CRM_Contribute_Page_Tab::recurLinks($id, 'contribution');
-  }
-
 }