r105941 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105940‎ | r105941 | r105942 >
Date:22:22, 12 December 2011
Author:khorn
Status:deferred
Tags:fundraising 
Comment:
followup r105938
Unbreaks the array_walk on sanitizeInput
Modified paths:
  • /trunk/extensions/DonationInterface/gateway_common/DonationData.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/gateway_common/DonationData.php
@@ -252,7 +252,7 @@
253253 */
254254 public function getVal_Escaped( $key ) {
255255 if ( $this->isSomething( $key ) ) {
256 - return $this->sanitizeInput( $this->normalized[$key] );
 256+ return $this->sanitizeInput( $this->normalized[$key], $key );
257257 } else {
258258 return null;
259259 }
@@ -477,10 +477,11 @@
478478 * Intended to be used with something like array_walk.
479479 *
480480 * @param $value The value of the array
 481+ * @param $key The key of the array
481482 * @param $flags The flag constant for htmlspecialchars
482483 * @param $double_encode Whether or not to double-encode strings
483484 */
484 - protected function sanitizeInput( &$value, $flags=ENT_COMPAT, $double_encode=false ) {
 485+ protected function sanitizeInput( &$value, $key, $flags=ENT_COMPAT, $double_encode=false ) {
485486 $value = htmlspecialchars( $value, $flags, 'UTF-8', $double_encode );
486487 }
487488

Follow-up revisions

RevisionCommit summaryAuthorDate
r112287MFT r101785, r105938, r105941, r105953, r106109, r106158, r106259, r106366, r...khorn01:29, 24 February 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r105938Data handling cleanup in DonationInterface, part 1 of [some]....khorn22:12, 12 December 2011

Status & tagging log