Ejegg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/317549

Change subject: Remove unused MinfraudActionRanges global
......................................................................

Remove unused MinfraudActionRanges global

The MinFraud score is not considered on its own, rather it is combined
with the rest of the filter scores and an action is determined by
consulting the CustomFiltersActionRanges global.

Change-Id: I9d9d07c16a2f1f7a9342c3aa571c9aff7854c48f
---
M README.txt
M extension.json
M extras/custom_filters/filters/minfraud/minfraud.body.php
3 files changed, 18 insertions(+), 59 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/49/317549/1

diff --git a/README.txt b/README.txt
index 317bca0..dc47937 100644
--- a/README.txt
+++ b/README.txt
@@ -383,7 +383,21 @@
 $wgDonationInterfaceForbiddenCountries = array()
 
 //Custom Filters globals
-//Define the action to take for a given $risk_score
+/**
+ * Set the risk score ranges that will cause a particular 'action'
+ *
+ * The keys to the array are the 'actions' to be taken (eg 'process').
+ * The value for one of these keys is an array representing the lower
+ * and upper bounds for that action.  For instance,
+ *  $wgDonationInterfaceCustomFiltersActionRanges = array(
+ *             'process' => array( 0, 100)
+ *             ...
+ *     )
+ * means that any transaction with a risk score greater than or equal
+ * to 0 and less than or equal to 100 will be given the 'process' action.
+ *
+ * These are evaluated on a >= or <= basis.
+ */
 $wgDonationInterfaceCustomFiltersActionRanges = array(
        'process' => array( 0, 100 ),
        'review' => array( -1, -1 ),
@@ -392,11 +406,11 @@
 )
 
 /**
- * A value for tracking the 'riskiness' of a transaction
+ * A base value for tracking the 'riskiness' of a transaction
  *
  * The action to take based on a transaction's riskScore is determined by
- * $action_ranges.  This is built assuming a range of possible risk scores
- * as 0-100, although you can probably bend this as needed.
+ * CustomFiltersActionRanges.  This is built assuming a range of possible
+ * risk scores as 0-100, although you can probably bend this as needed.
  */
 $wgDonationInterfaceCustomFiltersRiskScore = 0
 
@@ -405,29 +419,6 @@
  * Your minFraud license key.
  */
 $wgMinFraudLicenseKey = ''
-
-/**
- * Set the risk score ranges that will cause a particular 'action'
- *
- * The keys to the array are the 'actions' to be taken (eg 'process').
- * The value for one of these keys is an array representing the lower
- * and upper bounds for that action.  For instance,
- *   $wgDonationInterfaceMinFraudActionRanges = array(
- *             'process' => array( 0, 100)
- *             ...
- *     )
- * means that any transaction with a risk score greather than or equal
- * to 0 and less than or equal to 100 will be given the 'process' action.
- *
- * These are evauluated on a >= or <= basis.  Please refer to minFraud
- * documentation for a thorough explanation of the 'riskScore'.
- */
-$wgDonationInterfaceMinFraudActionRanges = array(
-       'process' => array( 0, 100 ),
-       'review' => array( -1, -1 ),
-       'challenge' => array( -1, -1 ),
-       'reject' => array( -1, -1 )
-)
 
 /**
  * This allows setting where to point the minFraud servers.
diff --git a/extension.json b/extension.json
index 494c229..8dc238b 100644
--- a/extension.json
+++ b/extension.json
@@ -408,25 +408,6 @@
                },
                "DonationInterfaceCustomFiltersRiskScore": 0,
                "MinFraudLicenseKey": "",
-               "DonationInterfaceMinFraudActionRanges": {
-                       "process": [
-                               0,
-                               100
-                       ],
-                       "review": [
-                               -1,
-                               -1
-                       ],
-                       "challenge": [
-                               -1,
-                               -1
-                       ],
-                       "reject": [
-                               -1,
-                               -1
-                       ],
-                       "_merge_strategy": "array_plus_2d"
-               },
                "DonationInterfaceMinFraudServers": [],
                "MinFraudTimeout": 2,
                "DonationInterfaceMinFraudAlarmLimit": 25000,
diff --git a/extras/custom_filters/filters/minfraud/minfraud.body.php 
b/extras/custom_filters/filters/minfraud/minfraud.body.php
index 009f96d..ee523fb 100644
--- a/extras/custom_filters/filters/minfraud/minfraud.body.php
+++ b/extras/custom_filters/filters/minfraud/minfraud.body.php
@@ -31,7 +31,6 @@
  * @code
  * $wgDonationInterfaceEnableMinfraud = true;
  * $wgMinFraudLicenseKey = 'YOUR LICENSE KEY';
- * $wgDonationInterfaceMinFraudActionRanges
  * @endcode
  */
 class Gateway_Extras_CustomFilters_MinFraud extends Gateway_Extras {
@@ -85,12 +84,6 @@
        protected $fraud_logger;
 
        /**
-        * Determines which action to take for a given score
-        * @var array @see $wgDonationInterfaceMinFraudActionRanges
-        */
-       protected $action_ranges;
-
-       /**
         * Constructor
         *
         * @param GatewayType    $gateway_adapter    Gateway adapter instance
@@ -116,12 +109,6 @@
                        throw new RuntimeException( "minFraud license key 
required but not present." );
                }
                $this->minfraudLicenseKey = ( $license_key ) ? $license_key : 
$wgMinFraudLicenseKey;
-               
-               // Set the action range
-               $gateway_ranges = $gateway_adapter->getGlobal( 
'MinFraudActionRanges' );
-               if ( !is_null( $gateway_ranges ) ) {
-                       $this->action_ranges = $gateway_ranges;
-               }
                
                // Set the minFraud API servers
                $minFraudServers = $gateway_adapter->getGlobal( 
'MinFraudServers' );

-- 
To view, visit https://gerrit.wikimedia.org/r/317549
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d9d07c16a2f1f7a9342c3aa571c9aff7854c48f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg <eeggles...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to