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

Revision: 96020
Author:   awjrichards
Date:     2011-09-01 18:11:06 +0000 (Thu, 01 Sep 2011)
Log Message:
-----------
Added token that maps to wgScriptPath for RapidHtml system

Modified Paths:
--------------
    trunk/extensions/DonationInterface/payflowpro_gateway/forms/RapidHtml.php

Modified: 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/RapidHtml.php
===================================================================
--- trunk/extensions/DonationInterface/payflowpro_gateway/forms/RapidHtml.php   
2011-09-01 18:08:09 UTC (rev 96019)
+++ trunk/extensions/DonationInterface/payflowpro_gateway/forms/RapidHtml.php   
2011-09-01 18:11:06 UTC (rev 96020)
@@ -52,6 +52,9 @@
                '@gateway', // => 'payflowpro', // this may need to become 
dynamic in the future
                '@owa_session', // => $wgRequest->getText( 'owa_session', null 
),
                '@owa_ref', // => $owa_ref,
+               // Not actually data tokens, but available to you in html form:
+               // @captcha -> the captcha form
+               // @script_path -> maps to $wgScriptPath 
        );
        
        /**
@@ -77,7 +80,6 @@
        
        public function __construct( &$form_data, &$form_errors ) {
                global $wgRequest;
-
                parent::__construct( $form_data, $form_errors );
                
                $this->loadValidateJs();
@@ -118,6 +120,8 @@
         * @return string The HTML form with real data in it
         */
        public function add_data( $html ) {
+               global $wgScriptPath;
+               
                // replace data
                $form = str_replace( $this->data_tokens, $this->form_data, 
$html );
 
@@ -127,6 +131,9 @@
                // handle captcha
                $form = str_replace( "@captcha", $this->getCaptchaHtml(), $form 
);
                
+               // handle script path
+               $form = str_replace( "@script_path", $wgScriptPath, $form );
+               
                $form = $this->fix_dropdowns( $form );
                
                return $form;


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to