r73431 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73430‎ | r73431 | r73432 >
Date:00:30, 21 September 2010
Author:awjrichards
Status:deferred
Tags:
Comment:
Added pretty donate button to cc form; fixed remaining ereg() and split() calls in minFraud API code
Modified paths:
  • /trunk/extensions/DonationInterface/payflowpro_gateway/extras/minfraud/ccfd/HTTPBase.php (modified) (history)
  • /trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumn.php (modified) (history)
  • /trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.css (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/payflowpro_gateway/extras/minfraud/ccfd/HTTPBase.php
@@ -216,7 +216,7 @@
217217 while (!feof($fp)) {
218218 $buf .= fgets($fp, 128);
219219 }
220 - $lines = split("\n", $buf);
 220+ $lines = preg_split("/\n/", $buf);
221221 // get the content
222222 $content = $lines[count($lines)-1];
223223 //close the connection
@@ -230,7 +230,7 @@
231231 print "readIpAddressFromWeb found ip addresses: " . $content . "\n";
232232 }
233233 // TODO fix regexp so that it checks if it only has IP addresses
234 - if (ereg ("([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})",$content)) {
 234+ if (preg_match("/([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/",$content)) {
235235 return $content;
236236 }
237237 return "";
@@ -357,7 +357,7 @@
358358 while (!feof($fp)) {
359359 $buf .= fgets($fp, 128);
360360 }
361 - $lines = split("\n", $buf);
 361+ $lines = preg_split("/\n/", $buf);
362362 // get the content
363363 $content = $lines[count($lines)-1];
364364 //close the connection
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumn.php
@@ -27,8 +27,9 @@
2828 global $wgScriptPath;
2929 // submit button and close form
3030 $form = Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit'));
31 - $form .= Xml::openElement( 'div', array( 'id' => 'mw-donate-submit-button' )) .
32 - Xml::submitButton( wfMsg( 'payflowpro_gateway-submit-button' ));
 31+ $form .= Xml::openElement( 'div', array( 'id' => 'mw-donate-submit-button' ));
 32+ //$form .= Xml::submitButton( wfMsg( 'payflowpro_gateway-submit-button' ));
 33+ $form .= Xml::openElement( 'input', array( 'class' => 'input-button button-navyblue', 'value' => wfMsg( 'payflowpro_gateway-submit-button'), 'onclick' => 'form.submit()'));
3334 $form .= Xml::closeElement( 'div' );
3435 $form .= Xml::openElement( 'div', array( 'class' => 'mw-donate-submessage', 'id' => 'payflowpro_gateway-donate-submessage' ) ) .
3536 wfMsg( 'payflowpro_gateway-donate-click' );
Index: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.css
@@ -67,3 +67,22 @@
6868 float: left;
6969 margin-right: 2em;
7070 }
 71+
 72+.button-navyblue {
 73+ background-image:url("http://upload.wikimedia.org/wikipedia/commons/0/06/Button-wavy-blue.png");
 74+ color:#FFFFFF;
 75+}
 76+
 77+.input-button {
 78+ background-color:transparent;
 79+ background-repeat:no-repeat;
 80+ border:medium none;
 81+ font-family:helvetica,impact,sans-serif;
 82+ font-size:1.4em;
 83+ font-weight:bold;
 84+ height:44px;
 85+ margin:0;
 86+ text-align:center;
 87+ vertical-align:middle;
 88+ width:204px;
 89+}

Status & tagging log