r32933 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32932‎ | r32933 | r32934 >
Date:23:30, 7 April 2008
Author:brion
Status:old
Tags:
Comment:
* (13624) Fix regression with manual thumb= parameter on images

Fixes parser test case:
* Fuzz testing: image with bogus manual thumbnail [Fixed between 07-Apr-2008 22:04:11, 1.13alpha (r32931) and 07-Apr-2008 23:29:32, 1.13alpha (r32931)]
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES
@@ -66,6 +66,7 @@
6767 * Make rev_deleted log entries more intelligible.
6868 * Logs are grouped under date headings similar to enhanced changes list
6969 * (6943) Added PAGESINCATEGORY: magic word
 70+* (13624) Fix regression with manual thumb= parameter on images
7071
7172
7273 === Bug fixes in 1.13 ===
Index: trunk/phase3/includes/Parser.php
@@ -4465,7 +4465,16 @@
44664466 $validated = $handler->validateParam( $paramName, $value );
44674467 } else {
44684468 # Validate internal parameters
4469 - $validated = ( $value === false || is_numeric( trim( $value ) ) );
 4469+ switch( $paramName ) {
 4470+ case "manualthumb":
 4471+ /// @fixme - possibly check validity here?
 4472+ /// downstream behavior seems odd with missing manual thumbs.
 4473+ $validated = true;
 4474+ break;
 4475+ default:
 4476+ // Most other things appear to be empty or numeric...
 4477+ $validated = ( $value === false || is_numeric( trim( $value ) ) );
 4478+ }
44704479 }
44714480
44724481 if ( $validated ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r32931fix martinp23erik21:00, 7 April 2008

Status & tagging log