r113406 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113405‎ | r113406 | r113407 >
Date:21:22, 8 March 2012
Author:awjrichards
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/wmf/1.19wmf1/includes/WebRequest.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.19wmf1/includes/WebRequest.php
@@ -379,7 +379,24 @@
380380 return $ret;
381381 }
382382
 383+
383384 /**
 385+ * Unset an arbitrary value from our get/post data.
 386+ *
 387+ * @param $key String: key name to use
 388+ * @return Mixed: old value if one was present, null otherwise
 389+ */
 390+ public function unsetVal( $key ) {
 391+ if ( !isset( $this->data[$key] ) ) {
 392+ $ret = null;
 393+ } else {
 394+ $ret = $this->data[$key];
 395+ unset( $this->data[$key] );
 396+ }
 397+ return $ret;
 398+ }
 399+
 400+ /**
384401 * Fetch an array from the input or return $default if it's not set.
385402 * If source was scalar, will return an array with a single element.
386403 * If no source and no default, returns NULL.
Property changes on: branches/wmf/1.19wmf1/includes/WebRequest.php
___________________________________________________________________
Added: svn:mergeinfo
387404 Merged /branches/JSTesting/includes/WebRequest.php:r100352-107913
388405 Merged /branches/REL1_15/phase3/includes/WebRequest.php:r51646
389406 Merged /branches/wmf/1.18wmf1/includes/WebRequest.php:r97508,111667
390407 Merged /branches/sqlite/includes/WebRequest.php:r58211-58321
391408 Merged /trunk/phase3/includes/WebRequest.php:r111029,111034,111067,111085,111128,111144,111251,111397,111427,111571,111574,111597,111658,111673,111695,111697,111750,111827,111965-111967,112021,112045-112046,112049,112061-112063,112065-112066,112070-112071,112079,112128,112132-112133,112152,112184,112259,112290,112347,112374,112378,112381,112383,112397,112408,112474,112526,112534,112563,112700,112732,112839-112840,112843,112855,112866,112951,112995,113099,113169,113312
392409 Merged /branches/new-installer/phase3/includes/WebRequest.php:r43664-66004
393410 Merged /branches/wmf-deployment/includes/WebRequest.php:r53381

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r112732Added unsetVal() method as antithesis to setVal()awjrichards21:56, 29 February 2012

Status & tagging log