Follow-up r82049: Fix strict comparison because MediaHandler::parseParamString()...
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Sun, 13 Feb 2011 20:38:05 +0000 (20:38 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Sun, 13 Feb 2011 20:38:05 +0000 (20:38 +0000)
Add __METHOD__ to wfDebug() call.

includes/api/ApiQueryImageInfo.php
includes/filerepo/ForeignAPIRepo.php

index 6283192..d95836e 100644 (file)
@@ -242,7 +242,7 @@ class ApiQueryImageInfo extends ApiQueryBase {
                }
 
                if ( isset( $paramList['width'] ) ) {
-                       if ( $paramList['width'] !== $thumbParams['width'] ) {
+                       if ( intval( $paramList['width'] ) != intval( $thumbParams['width'] ) ) {
                                $this->dieUsage( "{$p}urlparam had width of {$paramList['width']} but "
                                        . "{$p}urlwidth was {$thumbParams['width']}", "urlparam_urlwidth_mismatch" );
                        }
index f37859c..35a0ffd 100644 (file)
@@ -243,7 +243,8 @@ class ForeignAPIRepo extends FileRepo {
                        $knownThumbUrls = array();
                } else {
                        if( isset( $knownThumbUrls[$sizekey] ) ) {
-                               wfDebug("Got thumburl from local cache. {$knownThumbUrls[$sizekey]} \n");
+                               wfDebug( __METHOD__ . ': Got thumburl from local cache: ' .
+                                       "{$knownThumbUrls[$sizekey]} \n");
                                return $knownThumbUrls[$sizekey];
                        }
                        /* This size is not yet known */