X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FMember%2FSelector%2FSearch.php;h=f31c34d0f822e0cc6b3a321bf4d541d34c156dbf;hb=d108c55f8bf5e2f42af1fe7728f06c144cb9226e;hp=c57491f7b96f20b297eba28c4f30b3029a2faf87;hpb=b7412ea74b71e2c3c457639e301d57147655bd4e;p=civicrm-core.git diff --git a/CRM/Member/Selector/Search.php b/CRM/Member/Selector/Search.php index c57491f7b9..f31c34d0f8 100644 --- a/CRM/Member/Selector/Search.php +++ b/CRM/Member/Selector/Search.php @@ -103,7 +103,7 @@ class CRM_Member_Selector_Search extends CRM_Core_Selector_Base implements CRM_C /** * The query object. * - * @var string + * @var CRM_Contact_BAO_Query */ protected $_query; @@ -165,17 +165,17 @@ class CRM_Member_Selector_Search extends CRM_Core_Selector_Base implements CRM_C * * @param string $status * @param bool $isPaymentProcessor - * @param null $accessContribution - * @param null $qfKey - * @param null $context + * @param bool $accessContribution + * @param string|null $qfKey + * @param string|null $context * @param bool $isCancelSupported * * @return array */ public static function &links( $status = 'all', - $isPaymentProcessor = NULL, - $accessContribution = NULL, + $isPaymentProcessor = FALSE, + $accessContribution = FALSE, $qfKey = NULL, $context = NULL, $isCancelSupported = FALSE @@ -308,19 +308,15 @@ class CRM_Member_Selector_Search extends CRM_Core_Selector_Base implements CRM_C $processors = CRM_Core_PseudoConstant::paymentProcessor(FALSE, FALSE, "billing_mode IN ( 1, 3 )" ); + $isPaymentProcessor = FALSE; if (count($processors) > 0) { - $this->_isPaymentProcessor = TRUE; - } - else { - $this->_isPaymentProcessor = FALSE; + $isPaymentProcessor = TRUE; } // Only show credit card membership signup and renewal if user has CiviContribute permission + $accessContribution = FALSE; if (CRM_Core_Permission::access('CiviContribute')) { - $this->_accessContribution = TRUE; - } - else { - $this->_accessContribution = FALSE; + $accessContribution = TRUE; } //get all campaigns. @@ -375,8 +371,8 @@ class CRM_Member_Selector_Search extends CRM_Core_Selector_Base implements CRM_C $isCancelSupported = CRM_Member_BAO_Membership::isCancelSubscriptionSupported($row['membership_id']); $links = self::links('all', - $this->_isPaymentProcessor, - $this->_accessContribution, + $isPaymentProcessor, + $accessContribution, $this->_key, $this->_context, $isCancelSupported @@ -524,7 +520,7 @@ class CRM_Member_Selector_Search extends CRM_Core_Selector_Base implements CRM_C /** * Alphabet query. * - * @return mixed + * @return CRM_Core_DAO */ public function alphabetQuery() { return $this->_query->alphabetQuery();