Simplify _isBlacklisted method.
authorDavid Thompson <davet@gnu.org>
Mon, 14 Jul 2014 17:07:11 +0000 (13:07 -0400)
committerDavid Thompson <davet@gnu.org>
Mon, 14 Jul 2014 17:07:11 +0000 (13:07 -0400)
trustcommerce.php

index f6e5e80814bcfcdb3f04241ee5c0b37769397aff..ce6f4b9a1239067e8da39d58b17f8f6ad3ee9298 100644 (file)
@@ -151,13 +151,11 @@ class org_fsf_payment_trustcommerce extends CRM_Core_Payment {
     }
   }
 
+  /* Return TRUE when client is either IP or agent blacklisted, or
+   * FALSE otherwise.
+   */
   function _isBlacklisted() {
-    if($this->_isIPBlacklisted()) {
-      return TRUE;
-    } else if($this->_IsAgentBlacklisted()) {
-      return TRUE;
-    } 
-    return FALSE;
+    return $this->_isIPBlacklisted() || $this->_IsAgentBlacklisted();
   }
 
   function _isAgentBlacklisted() {