http://www.mediawiki.org/wiki/Special:Code/MediaWiki/75672

Revision: 75672
Author:   reedy
Date:     2010-10-29 20:54:45 +0000 (Fri, 29 Oct 2010)
Log Message:
-----------
Fixup deprecated stuff, kill unused globals and variables

Modified Paths:
--------------
    trunk/extensions/DonationInterface/GeoIP/GeoIP.php
    trunk/extensions/DonationInterface/activemq_stomp/Stomp/Frame.php
    trunk/extensions/DonationInterface/activemq_stomp/Stomp.php
    trunk/extensions/DonationInterface/activemq_stomp/activemq_stomp.php
    trunk/extensions/DonationInterface/donate_interface/donate_interface.php
    
trunk/extensions/DonationInterface/payflowpro_gateway/extras/minfraud/ccfd/HTTPBase.php
    trunk/extensions/DonationInterface/payflowpro_gateway/forms/Form.php
    
trunk/extensions/DonationInterface/payflowpro_gateway/forms/OneStepTwoColumn.php
    trunk/extensions/DonationInterface/payflowpro_gateway/forms/SingleColumn.php
    
trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter.php
    
trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter2.php
    
trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnPayPal.php
    
trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoStepTwoColumn.php
    
trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoStepTwoColumnLetter.php
    
trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php
    trunk/extensions/DonationInterface/paypal_gateway/paypal_gateway.php

Modified: trunk/extensions/DonationInterface/GeoIP/GeoIP.php
===================================================================
--- trunk/extensions/DonationInterface/GeoIP/GeoIP.php  2010-10-29 20:45:31 UTC 
(rev 75671)
+++ trunk/extensions/DonationInterface/GeoIP/GeoIP.php  2010-10-29 20:54:45 UTC 
(rev 75672)
@@ -68,8 +68,6 @@
                throw new UnsupportedGeoIP( 'Only IPv4 addresses are 
supported.' );
        }
 
-       $country_code = null;
-
        $dbr = wfGetDB( DB_SLAVE );
        $long_ip = IP::toUnsigned( $ip_address );
        $conditions = array(

Modified: trunk/extensions/DonationInterface/activemq_stomp/Stomp/Frame.php
===================================================================
--- trunk/extensions/DonationInterface/activemq_stomp/Stomp/Frame.php   
2010-10-29 20:45:31 UTC (rev 75671)
+++ trunk/extensions/DonationInterface/activemq_stomp/Stomp/Frame.php   
2010-10-29 20:54:45 UTC (rev 75672)
@@ -74,7 +74,7 @@
         
         $data .= "\n";
         $data .= $this->body;
-        return $data .= "\x00\n";
+        return $data . "\x00\n";
     }
 }
 ?>

Modified: trunk/extensions/DonationInterface/activemq_stomp/Stomp.php
===================================================================
--- trunk/extensions/DonationInterface/activemq_stomp/Stomp.php 2010-10-29 
20:45:31 UTC (rev 75671)
+++ trunk/extensions/DonationInterface/activemq_stomp/Stomp.php 2010-10-29 
20:54:45 UTC (rev 75672)
@@ -454,8 +454,6 @@
      */
     public function disconnect ()
     {
-               $header = array();
-
                if ($this->clientId != null) {
                        $headers["client-id"] = $this->clientId;
                }
@@ -561,9 +559,9 @@
      */
     public function hasFrameToRead()
     {
-        return TRUE; // http://bugs.php.net/bug.php?id=46024
+        return true; // http://bugs.php.net/bug.php?id=46024
         
-        $read = array($this->_socket);
+        /*$read = array($this->_socket);
         $write = null;
         $except = null;
         
@@ -575,7 +573,7 @@
             return true;
         } else {
             return false; 
-        }
+        }*/
     }
     
     /**

Modified: trunk/extensions/DonationInterface/activemq_stomp/activemq_stomp.php
===================================================================
--- trunk/extensions/DonationInterface/activemq_stomp/activemq_stomp.php        
2010-10-29 20:45:31 UTC (rev 75671)
+++ trunk/extensions/DonationInterface/activemq_stomp/activemq_stomp.php        
2010-10-29 20:54:45 UTC (rev 75672)
@@ -29,9 +29,9 @@
 * Create <donate /> tag to include landing page donation form
 */
 function efStompSetup(&$parser) {
-            global $wgParser, $wgOut;
+            global $wgParser, ;
 
-       //redundant and causes Fatal Error
+               //redundant and causes Fatal Error
             //$parser->disableCache();
 
             $wgParser->setHook( 'stomp', 'efStompTest' );
@@ -57,12 +57,10 @@
 $wgHooks['gwStomp'][] = 'sendSTOMP';
 $wgHooks['gwPendingStomp'][] = 'sendPendingSTOMP';
 
-
 /*
 * Hook to send transaction information to ActiveMQ server
 */
 function sendSTOMP($transaction) {
-        global $wgOut;
         global $wgStompServer, $wgStompQueueName;
 
         $queueName = isset ( $wgStompQueueName ) ? $wgStompQueueName : 'test';
@@ -94,7 +92,6 @@
 * Hook to send transaction information to ActiveMQ server
 */
 function sendPendingSTOMP($transaction) {
-        global $wgOut;
         global $wgStompServer, $wgPendingStompQueueName;
 
         $queueName = isset ( $wgPendingStompQueueName ) ? 
$wgPendingStompQueueName : 'pending';
@@ -136,10 +133,6 @@
  * Response from Payflow is assigned to 'response'
  */
 function createQueueMessage($transaction) {
-        $message = array();
-
-        $timestamp = strtotime($transaction['date']);
-
         // specifically designed to match the CiviCRM API that will handle it
         // edit this array to include/ignore transaction data sent to the 
server
         $message = array(

Modified: 
trunk/extensions/DonationInterface/donate_interface/donate_interface.php
===================================================================
--- trunk/extensions/DonationInterface/donate_interface/donate_interface.php    
2010-10-29 20:45:31 UTC (rev 75671)
+++ trunk/extensions/DonationInterface/donate_interface/donate_interface.php    
2010-10-29 20:54:45 UTC (rev 75672)
@@ -32,11 +32,6 @@
  * Create <donate /> tag to include landing page donation form
  */
 function efDonateSetup( &$parser ) {
-  global $wgHooks, $wgRequest;
-       
-  //load extension messages
-  wfLoadExtensionMessages( 'DonateInterface' );
-
   $parser->setHook( 'donate', 'efDonateRender' );
 
   return true;
@@ -82,14 +77,8 @@
  * option supplies it's value and name for the form, as well as currencies it 
supports.
  */
 function fnDonateCreateOutput() {
-  global $wgOut, $wgRequest;
+  global $wgRequest;
 
-  // declare variable
-       $utm_source = '';
-       $utm_medium = '';
-       $utm_campaign = '';
-       $referrer = '';
-       
   // set them equal to post data
   $utm_source = $wgRequest->getText( 'utm_source' );
   $utm_medium = $wgRequest->getText( 'utm_medium' );
@@ -140,12 +129,12 @@
         Xml::element( 'p', array( 'class' => 'mw-donation-intro-text' ), 
wfMsg( 'donate_interface-intro' )) .
         Xml::closeElement( 'div' );
                 
-  $output .= Xml::hidden( 'utm_source', $utm_source ) .
-        Xml::hidden( 'utm_medium', $utm_medium ) . 
-        Xml::hidden( 'utm_campaign', $utm_campaign ) .
-        Xml::hidden( 'language', $language ) .
-        Xml::hidden( 'referrer', $referrer ) .
-        XML::hidden('process', '_yes_');
+  $output .= Html::hidden( 'utm_source', $utm_source ) .
+        Html::hidden( 'utm_medium', $utm_medium ) .
+        Html::hidden( 'utm_campaign', $utm_campaign ) .
+        Html::hidden( 'language', $language ) .
+        Html::hidden( 'referrer', $referrer ) .
+        Html::hidden('process', '_yes_');
         
   $amount = array(
         Xml::radioLabel(wfMsg( 'donate_interface-big-amount-display' ), 
'amount', wfMsg( 'donate_interface-big-amount-value' ), 'input_amount_3', false 
 ),
@@ -228,7 +217,7 @@
 * matches the form value (also supplied by the gateway)
 */
 function fnDonateRedirectToProcessorPage($userInput, $url) {
-  global $wgOut,$wgPaymentGatewayHost;
+  global $wgOut;
         
   $chosenGateway = $userInput['gateway'];
 
@@ -272,7 +261,6 @@
        require_once( 'country2currency.inc' );
 
        $country_code = null;
-       $currency = null;
 
        if( function_exists( 'fnGetCountry' ) ) {
                $country_code = fnGetCountry();
@@ -280,7 +268,7 @@
 
        $currency = fnCountry2Currency( $country_code );
 
-       return $result = $currency ? $currency : 'USD';
+       return $currency ? $currency : 'USD';
 }
 
 /**

Modified: 
trunk/extensions/DonationInterface/payflowpro_gateway/extras/minfraud/ccfd/HTTPBase.php
===================================================================
--- 
trunk/extensions/DonationInterface/payflowpro_gateway/extras/minfraud/ccfd/HTTPBase.php
     2010-10-29 20:45:31 UTC (rev 75671)
+++ 
trunk/extensions/DonationInterface/payflowpro_gateway/extras/minfraud/ccfd/HTTPBase.php
     2010-10-29 20:54:45 UTC (rev 75672)
@@ -251,7 +251,7 @@
     $numquerieskeys = count($this->queries); // get the number of keys in the 
hash called queries
     $querieskeys = array_keys($this->queries); // get a array of keys in the 
hash called queries
     if ($this->debug == 1) {
-      print "number of query keys " + $numquerieskeys + "\n";
+      print "number of query keys " . $numquerieskeys . "\n";
     }
 
     $query_string = "";
@@ -273,8 +273,6 @@
       }
     }
 
-    $content = "";
-
     //check if the curl module exists
     if (extension_loaded('curl')) {
       //use curl

Modified: trunk/extensions/DonationInterface/payflowpro_gateway/forms/Form.php
===================================================================
--- trunk/extensions/DonationInterface/payflowpro_gateway/forms/Form.php        
2010-10-29 20:45:31 UTC (rev 75671)
+++ trunk/extensions/DonationInterface/payflowpro_gateway/forms/Form.php        
2010-10-29 20:54:45 UTC (rev 75672)
@@ -334,8 +334,6 @@
         */
        public function setHiddenFields( $hidden_fields=NULL ) {
                if ( !$hidden_fields ) {
-                       global $wgRequest;
-
                        $hidden_fields =  array(
                                'utm_source' => $this->form_data[ 'utm_source' 
],
                                'utm_medium' => $this->form_data[ 'utm_medium' 
],
@@ -591,7 +589,7 @@
 
                $form = '<tr>';
                $form .= '<td class="paypal-button" colspan="2">';
-               $form .= Xml::hidden( 'PaypalRedirect', false );
+               $form .= Html::hidden( 'PaypalRedirect', false );
                $form .= Xml::tags( 'div',
                                array(),
                                '<a href="#" 
onclick="document.payment.PaypalRedirect.value=\'true\';document.payment.submit();"><img
 src="'.$scriptPath.'/donate_with_paypal.gif"/></a>'

Modified: 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/OneStepTwoColumn.php
===================================================================
--- 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/OneStepTwoColumn.php
    2010-10-29 20:45:31 UTC (rev 75671)
+++ 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/OneStepTwoColumn.php
    2010-10-29 20:54:45 UTC (rev 75672)
@@ -4,7 +4,7 @@
        public $paypal = false; // true for paypal only version
 
        public function __construct( &$form_data, &$form_errors ) {
-               global $wgOut, $wgScriptPath;
+               global $wgOut;
 
                parent::__construct( $form_data, $form_errors );
 
@@ -61,7 +61,7 @@
        }
 
        public function generateFormStart() {
-               global $wgPayflowGatewayHeader, $wgPayflwGatewayTest, $wgOut, 
$wgRequest;
+               global $wgRequest;
 
                $this->paypal = $wgRequest->getBool( 'paypal', false );
 
@@ -109,7 +109,7 @@
                $form = Xml::openElement( 'div', array( 'id' => 
'payflowpro_gateway-form-submit'));
                $form .= Xml::openElement( 'div', array( 'id' => 
'mw-donate-submit-button' ));
                if ( $this->paypal ) {
-                       $form .= Xml::hidden( 'PaypalRedirect', false );
+                       $form .= Html::hidden( 'PaypalRedirect', false );
                        $form .= Xml::element( 'input', array( 'class' => 
'button-plain', 'value' => wfMsg( 'payflowpro_gateway-paypal-button'), 
'onclick' => 
'document.payment.PaypalRedirect.value=\'true\';document.payment.submit();', 
'type' => 'submit'));
                } else {
                        $form .= Xml::element( 'input', array( 'class' => 
'button-plain', 'value' => wfMsg( 'payflowpro_gateway-cc-button'), 'onclick' => 
'submit_form( this )', 'type' => 'submit'));
@@ -128,7 +128,7 @@
                // add hidden fields
                $hidden_fields = $this->getHiddenFields();
                foreach ( $hidden_fields as $field => $value ) {
-                       $form .= Xml::hidden( $field, $value );
+                       $form .= Html::hidden( $field, $value );
                }
                $form .= Xml::closeElement( 'div' ); // close div#right-column
                $form .= Xml::closeElement( 'form' );
@@ -220,7 +220,7 @@
        }
 
        protected function generatePaymentFields() {
-               global $wgScriptPath, $wgPayflowGatewayTest;
+               global $wgScriptPath;
 
                $form = '';
 

Modified: 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/SingleColumn.php
===================================================================
--- 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/SingleColumn.php    
    2010-10-29 20:45:31 UTC (rev 75671)
+++ 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/SingleColumn.php    
    2010-10-29 20:54:45 UTC (rev 75672)
@@ -3,7 +3,7 @@
 class PayflowProGateway_Form_SingleColumn extends 
PayflowProGateway_Form_TwoColumnLetter {
 
        public function __construct( &$form_data, &$form_errors ) {
-               global $wgOut, $wgScriptPath;
+               global $wgScriptPath;
 
                // set the path to css, before the parent constructor is 
called, checking to make sure some child class hasn't already set this
                if ( !strlen( $this->getStylePath())) {

Modified: 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter.php
===================================================================
--- 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter.php 
    2010-10-29 20:45:31 UTC (rev 75671)
+++ 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter.php 
    2010-10-29 20:54:45 UTC (rev 75672)
@@ -4,7 +4,7 @@
        public $paypal = false; // true for paypal only version
 
        public function __construct( &$form_data, &$form_errors ) {
-               global $wgOut, $wgScriptPath;
+               global $wgScriptPath;
 
                // set the path to css, before the parent constructor is 
called, checking to make sure some child class hasn't already set this
                if ( !strlen( $this->getStylePath())) {
@@ -115,7 +115,7 @@
                                $form .= '<tr>';
                                $form .= '<td class="label"></td>';
                                $form .= '<td class="paypal-button">';
-                               $form .= Xml::hidden( 'PaypalRedirect', false );
+                               $form .= Html::hidden( 'PaypalRedirect', false 
);
                                $form .= Xml::tags( 'div',
                                                array(),
                                                Xml::element( 'img', array( 
'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/credit_card_logos2.gif"
 )) . '&nbsp;&nbsp;&nbsp;<a href="#" 
onclick="document.payment.PaypalRedirect.value=\'true\';document.payment.submit();"><img
 src="'.$scriptPath.'/donate_with_paypal.gif"/></a>'
@@ -159,7 +159,7 @@
                // add hidden fields
                $hidden_fields = $this->getHiddenFields();
                foreach ( $hidden_fields as $field => $value ) {
-                       $form .= Xml::hidden( $field, $value );
+                       $form .= Html::hidden( $field, $value );
                }
 
                $form .= Xml::closeElement( 'form' ); // close form 'payment'

Modified: 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter2.php
===================================================================
--- 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter2.php
    2010-10-29 20:45:31 UTC (rev 75671)
+++ 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter2.php
    2010-10-29 20:54:45 UTC (rev 75672)
@@ -4,7 +4,7 @@
        public $paypal = false; // true for paypal only version
 
        public function __construct( &$form_data, &$form_errors ) {
-               global $wgOut, $wgScriptPath;
+               global $wgScriptPath;
 
                // set the path to css, before the parent constructor is 
called, checking to make sure some child class hasn't already set this
                if ( !strlen( $this->getStylePath())) {
@@ -111,7 +111,7 @@
                                $form .= '<tr>';
                                $form .= '<td class="label"></td>';
                                $form .= '<td>';
-                               $form .= Xml::hidden( 'PaypalRedirect', false );
+                               $form .= Html::hidden( 'PaypalRedirect', false 
);
                                $form .= Xml::tags( 'div',
                                                array(),
                                                Xml::element( 'img', array( 
'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/credit_card_logos.gif"
 ))
@@ -162,7 +162,7 @@
                $form = Xml::openElement( 'div', array( 'id' => 
'payflowpro_gateway-form-submit'));
                $form .= Xml::openElement( 'div', array( 'id' => 
'mw-donate-submit-button' ));
                if ( $this->paypal ) {
-                       $form .= Xml::hidden( 'PaypalRedirect', false );
+                       $form .= Html::hidden( 'PaypalRedirect', false );
                        $form .= Xml::element( 'input', array( 'class' => 
'button-plain', 'value' => wfMsg( 'payflowpro_gateway-paypal-button'), 
'onclick' => 
'document.payment.PaypalRedirect.value=\'true\';document.payment.submit();', 
'type' => 'submit'));
                } else {
                        $form .= Xml::element( 'input', array( 'class' => 
'button-plain', 'value' => wfMsg( 'payflowpro_gateway-donor-submit'), 'onclick' 
=> 'submit_form( this )', 'type' => 'submit'));
@@ -184,7 +184,7 @@
                // add hidden fields
                $hidden_fields = $this->getHiddenFields();
                foreach ( $hidden_fields as $field => $value ) {
-                       $form .= Xml::hidden( $field, $value );
+                       $form .= Html::hidden( $field, $value );
                }
 
                $form .= Xml::closeElement( 'form' ); // close form 'payment'

Modified: 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnPayPal.php
===================================================================
--- 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnPayPal.php 
    2010-10-29 20:45:31 UTC (rev 75671)
+++ 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnPayPal.php 
    2010-10-29 20:54:45 UTC (rev 75672)
@@ -2,12 +2,10 @@
 
 class PayflowProGateway_Form_TwoColumnPayPal extends 
PayflowProGateway_Form_OneStepTwoColumn {
        public function __construct( &$form_data, &$form_errors ) {
-
                parent::__construct( $form_data, $form_errors );
        }
 
        public function generateFormStart() {
-               global $wgPayflowGatewayHeader, $wgPayflwGatewayTest, $wgOut;
                $form = $this->generateBannerHeader();
 
                $form .= Xml::openElement( 'div', array( 'id' => 
'mw-creditcard' ) );
@@ -46,7 +44,6 @@
        }
 
        protected function generatePersonalContainer() {
-               global $wgRequest;
                $form = '';
                $form .= Xml::openElement( 'div', array( 'id' => 
'payflowpro_gateway-personal-info' ));                 ;
                $form .= Xml::tags( 'h3', array( 'class' => 
'payflow-cc-form-header','id' => 'payflow-cc-form-header-personal' ), wfMsg( 
'payflowpro_gateway-make-your-donation' ));

Modified: 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoStepTwoColumn.php
===================================================================
--- 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoStepTwoColumn.php
    2010-10-29 20:45:31 UTC (rev 75671)
+++ 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoStepTwoColumn.php
    2010-10-29 20:54:45 UTC (rev 75672)
@@ -3,7 +3,7 @@
 class PayflowProGateway_Form_TwoStepTwoColumn extends PayflowProGateway_Form {
 
        public function __construct( &$form_data, &$form_errors ) {
-               global $wgOut, $wgScriptPath;
+               global $wgOut;
 
                parent::__construct( $form_data, $form_errors );
 
@@ -49,7 +49,6 @@
        }
 
        public function generateFormStart() {
-               global $wgPayflowGatewayHeader, $wgPayflwGatewayTest, $wgOut;
                $form = $this->generateBannerHeader();
 
                $form .= Xml::openElement( 'div', array( 'id' => 
'mw-creditcard' ) );
@@ -106,7 +105,7 @@
                // add hidden fields
                $hidden_fields = $this->getHiddenFields();
                foreach ( $hidden_fields as $field => $value ) {
-                       $form .= Xml::hidden( $field, $value );
+                       $form .= Html::hidden( $field, $value );
                }
                $form .= Xml::closeElement( 'div' ); // close div#right-column
                $form .= Xml::closeElement( 'form' );
@@ -172,10 +171,8 @@
        }
 
        protected function generatePaymentFields() {
-               global $wgScriptPath, $wgPayflowGatewayTest;
+               global $wgScriptPath;
 
-               $form = '';
-
                // amount
                $form = '<tr>';
                $form .= '<td colspan="2"><span class="creditcard-error-msg">' 
. $this->form_errors['invalidamount'] . '</span></td>';

Modified: 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoStepTwoColumnLetter.php
===================================================================
--- 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoStepTwoColumnLetter.php
      2010-10-29 20:45:31 UTC (rev 75671)
+++ 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoStepTwoColumnLetter.php
      2010-10-29 20:54:45 UTC (rev 75672)
@@ -2,7 +2,7 @@
 
 class PayflowProGateway_Form_TwoStepTwoColumnLetter extends 
PayflowProGateway_Form_TwoStepTwoColumn {
        public function __construct( &$form_data, &$form_errors ) {
-               global $wgOut, $wgScriptPath;
+               global $wgScriptPath;
 
                // set the path to css, before the parent constructor is 
called, checking to make sure some child class hasn't already set this
                if ( !strlen( $this->getStylePath())) {
@@ -79,7 +79,6 @@
 
        protected function generateBillingFields() {
                global $wgScriptPath;
-               $scriptPath = 
"$wgScriptPath/extensions/DonationInterface/payflowpro_gateway/includes";
 
                $form = '';
 
@@ -139,7 +138,7 @@
                // add hidden fields
                $hidden_fields = $this->getHiddenFields();
                foreach ( $hidden_fields as $field => $value ) {
-                       $form .= Xml::hidden( $field, $value );
+                       $form .= Html::hidden( $field, $value );
                }
 
                $form .= Xml::closeElement( 'form' ); // close form 'payment'

Modified: 
trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php
===================================================================
--- 
trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php
   2010-10-29 20:45:31 UTC (rev 75671)
+++ 
trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php
   2010-10-29 20:54:45 UTC (rev 75672)
@@ -41,8 +41,6 @@
         */
        public function __construct() {
                parent::__construct( 'PayflowProGateway' );
-               wfLoadExtensionMessages( 'PayflowProGateway' );
-
                $this->errors = $this->getPossibleErrors();
        }
 
@@ -52,8 +50,8 @@
         * @param $par Mixed: parameter passed to the page or null
         */
        public function execute( $par ) {
-               global $wgRequest, $wgOut, $wgUser, $wgScriptPath, 
-                       $wgPayFlowProGatewayCSSVersion, 
$wgPayflowGatewayPaypalURL, 
+               global $wgRequest, $wgOut, $wgScriptPath,
+                       $wgPayFlowProGatewayCSSVersion,
                        $wgPayflowGatewaySalt;
                
                $wgOut->addExtensionStyle( 
@@ -272,8 +270,6 @@
         * Checks posted form data for errors and returns array of messages
         */
        private function fnPayflowValidateForm( $data, &$error ) {
-               global $wgOut;
-               
                // begin with no errors
                $error_result = '0';
 
@@ -487,8 +483,7 @@
         * Credit: code modified from payflowpro_example_EC.php posted (and 
supervised) on the PayPal developers message board
         */
        private function fnPayflowGetResults( $data, $result ) {
-               global $wgOut;
-               // prepare NVP response for sorting and outputting 
+               // prepare NVP response for sorting and outputting
                $responseArray = array();
                
                /**
@@ -511,7 +506,6 @@
                $resultCode = $responseArray['RESULT'];
 
                // initialize response message
-               $tryAgainResponse = '';
                $responseMsg = '';
 
                // interpret result code, return
@@ -545,8 +539,7 @@
         */
        function fnPayflowGetResponseMsg( $resultCode, &$responseMsg ) {
                $responseMsg = wfMsg( 'payflowpro_gateway-response-default' );
-               $errorCode = '0';
-               
+
                switch( $resultCode ) {
                        case '0':
                                $responseMsg = wfMsg( 
'payflowpro_gateway-response-0' );
@@ -607,7 +600,6 @@
 
                global $wgOut, $wgExternalThankYouPage;
                $transaction = '';
-               $tracked = '';
 
                // push to ActiveMQ server 
                // include response message
@@ -1193,8 +1185,7 @@
                curl_setopt( $ch, CURLOPT_URL, $wgPayflowGatewayPaypalURL );
                curl_setopt( $ch, CURLOPT_POST, count( $data ) );
                curl_setopt( $ch, CURLOPT_POSTFIELDS, http_build_query( $data ) 
);
-               $result = curl_exec( $ch );
+               curl_exec( $ch );
                curl_close( $ch );
-
        }
 } // end class
\ No newline at end of file

Modified: trunk/extensions/DonationInterface/paypal_gateway/paypal_gateway.php
===================================================================
--- trunk/extensions/DonationInterface/paypal_gateway/paypal_gateway.php        
2010-10-29 20:45:31 UTC (rev 75671)
+++ trunk/extensions/DonationInterface/paypal_gateway/paypal_gateway.php        
2010-10-29 20:54:45 UTC (rev 75672)
@@ -76,7 +76,7 @@
  */
 function paypalGatewayPage( &$url ) {
        // Business email address set in LocalSettings.php
-       global $wgPaypalEmail, $wgPaypalUrl;
+       global $wgPaypalUrl;
 
        // to go directly to Paypal, will be used for this extension in general
        //$url['paypal'] = 
"https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business="; . urlencode( 
$wgPaypalEmail ) . 
"&lc=US&no_note=1&no_shipping=1&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted";


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

Reply via email to