From d1424f8f350adfa1dd9bffaaf58068281404dcf3 Mon Sep 17 00:00:00 2001 From: Saurabh Batra Date: Tue, 16 Feb 2016 23:34:09 +0530 Subject: [PATCH] CRM-18036 - Non- static methods being called statically and non-statically. https://issues.civicrm.org/jira/browse/CRM-18036 --- CRM/Contribute/Page/ContributionPage.php | 4 ++-- CRM/Custom/Page/Field.php | 4 ++-- CRM/Custom/Page/Group.php | 4 ++-- CRM/Custom/Page/Option.php | 2 +- CRM/Price/Page/Field.php | 4 ++-- CRM/Price/Page/Option.php | 4 ++-- CRM/UF/Page/Field.php | 4 ++-- CRM/UF/Page/Group.php | 4 ++-- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/CRM/Contribute/Page/ContributionPage.php b/CRM/Contribute/Page/ContributionPage.php index 9492452445..b82b485e0a 100644 --- a/CRM/Contribute/Page/ContributionPage.php +++ b/CRM/Contribute/Page/ContributionPage.php @@ -69,7 +69,7 @@ class CRM_Contribute_Page_ContributionPage extends CRM_Core_Page { * * @return array */ - public function &actionLinks() { + public static function &actionLinks() { // check if variable _actionsLinks is populated if (!isset(self::$_actionLinks)) { // helper variable for nicer formatting @@ -464,7 +464,7 @@ ORDER BY is_active desc, title asc CRM_Core_DAO::storeValues($dao, $contribution[$dao->id]); // form all action links - $action = array_sum(array_keys($this->actionLinks())); + $action = array_sum(array_keys(self::actionLinks())); //add configure actions links. $action += array_sum(array_keys($configureActionLinks)); diff --git a/CRM/Custom/Page/Field.php b/CRM/Custom/Page/Field.php index 97736a3bb2..99ab9b11c5 100644 --- a/CRM/Custom/Page/Field.php +++ b/CRM/Custom/Page/Field.php @@ -65,7 +65,7 @@ class CRM_Custom_Page_Field extends CRM_Core_Page { * @return array * array of action links that we need to display for the browse screen */ - public function &actionLinks() { + public static function &actionLinks() { if (!isset(self::$_actionLinks)) { self::$_actionLinks = array( CRM_Core_Action::UPDATE => array( @@ -136,7 +136,7 @@ class CRM_Custom_Page_Field extends CRM_Core_Page { while ($customFieldBAO->fetch()) { $customField[$customFieldBAO->id] = array(); CRM_Core_DAO::storeValues($customFieldBAO, $customField[$customFieldBAO->id]); - $action = array_sum(array_keys($this->actionLinks())); + $action = array_sum(array_keys(self::actionLinks())); if ($customFieldBAO->is_active) { $action -= CRM_Core_Action::ENABLE; } diff --git a/CRM/Custom/Page/Group.php b/CRM/Custom/Page/Group.php index af3932780f..12b7555b90 100644 --- a/CRM/Custom/Page/Group.php +++ b/CRM/Custom/Page/Group.php @@ -57,7 +57,7 @@ class CRM_Custom_Page_Group extends CRM_Core_Page { * @return array * array of action links that we need to display for the browse screen */ - public function &actionLinks() { + public static function &actionLinks() { // check if variable _actionsLinks is populated if (!isset(self::$_actionLinks)) { self::$_actionLinks = array( @@ -213,7 +213,7 @@ class CRM_Custom_Page_Group extends CRM_Core_Page { $customGroup[$id] = array(); CRM_Core_DAO::storeValues($dao, $customGroup[$id]); // form all action links - $action = array_sum(array_keys($this->actionLinks())); + $action = array_sum(array_keys(self::actionLinks())); // update enable/disable links depending on custom_group properties. if ($dao->is_active) { diff --git a/CRM/Custom/Page/Option.php b/CRM/Custom/Page/Option.php index 4b978feb52..c62552676a 100644 --- a/CRM/Custom/Page/Option.php +++ b/CRM/Custom/Page/Option.php @@ -72,7 +72,7 @@ class CRM_Custom_Page_Option extends CRM_Core_Page { * @return array * array of action links that we need to display for the browse screen */ - public function &actionLinks() { + public static function &actionLinks() { if (!isset(self::$_actionLinks)) { self::$_actionLinks = array( CRM_Core_Action::UPDATE => array( diff --git a/CRM/Price/Page/Field.php b/CRM/Price/Page/Field.php index 34b4ba6d25..185cb55893 100644 --- a/CRM/Price/Page/Field.php +++ b/CRM/Price/Page/Field.php @@ -72,7 +72,7 @@ class CRM_Price_Page_Field extends CRM_Core_Page { * @return array * array of action links that we need to display for the browse screen */ - public function &actionLinks() { + public static function &actionLinks() { if (!isset(self::$_actionLinks)) { self::$_actionLinks = array( CRM_Core_Action::UPDATE => array( @@ -160,7 +160,7 @@ class CRM_Price_Page_Field extends CRM_Core_Page { } } - $action = array_sum(array_keys($this->actionLinks())); + $action = array_sum(array_keys(self::actionLinks())); if ($this->_isSetReserved) { $action -= CRM_Core_Action::UPDATE + CRM_Core_Action::DELETE + CRM_Core_Action::ENABLE + CRM_Core_Action::DISABLE; diff --git a/CRM/Price/Page/Option.php b/CRM/Price/Page/Option.php index 5d2a8bbca3..34253ba0df 100644 --- a/CRM/Price/Page/Option.php +++ b/CRM/Price/Page/Option.php @@ -79,7 +79,7 @@ class CRM_Price_Page_Option extends CRM_Core_Page { * @return array * array of action links that we need to display for the browse screen */ - public function &actionLinks() { + public static function &actionLinks() { if (!isset(self::$_actionLinks)) { self::$_actionLinks = array( CRM_Core_Action::UPDATE => array( @@ -142,7 +142,7 @@ class CRM_Price_Page_Option extends CRM_Core_Page { $invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings); $getTaxDetails = FALSE; foreach ($customOption as $id => $values) { - $action = array_sum(array_keys($this->actionLinks())); + $action = array_sum(array_keys(self::actionLinks())); // Adding the required fields in the array if (isset($taxRate[$values['financial_type_id']])) { $customOption[$id]['tax_rate'] = $taxRate[$values['financial_type_id']]; diff --git a/CRM/UF/Page/Field.php b/CRM/UF/Page/Field.php index 25543e34ba..c2cec5186e 100644 --- a/CRM/UF/Page/Field.php +++ b/CRM/UF/Page/Field.php @@ -64,7 +64,7 @@ class CRM_UF_Page_Field extends CRM_Core_Page { * * @return array */ - public function &actionLinks() { + public static function &actionLinks() { if (!isset(self::$_actionLinks)) { self::$_actionLinks = array( CRM_Core_Action::UPDATE => array( @@ -154,7 +154,7 @@ class CRM_UF_Page_Field extends CRM_Core_Page { $ufField[$ufFieldBAO->id]['label'] = $ufFieldBAO->label; - $action = array_sum(array_keys($this->actionLinks())); + $action = array_sum(array_keys(self::actionLinks())); if ($ufFieldBAO->is_active) { $action -= CRM_Core_Action::ENABLE; } diff --git a/CRM/UF/Page/Group.php b/CRM/UF/Page/Group.php index 07ad421e1e..273dfab8fa 100644 --- a/CRM/UF/Page/Group.php +++ b/CRM/UF/Page/Group.php @@ -57,7 +57,7 @@ class CRM_UF_Page_Group extends CRM_Core_Page { * * @return array */ - public function &actionLinks() { + public static function &actionLinks() { // check if variable _actionsLinks is populated if (!self::$_actionLinks) { // helper variable for nicer formatting @@ -331,7 +331,7 @@ class CRM_UF_Page_Group extends CRM_Core_Page { $ufGroup[$id]['is_reserved'] = $value['is_reserved']; // form all action links - $action = array_sum(array_keys($this->actionLinks())); + $action = array_sum(array_keys(self::actionLinks())); // update enable/disable links depending on uf_group properties. if ($value['is_active']) { -- 2.25.1