From ea056f5171ad4ac573c4645716f7cdfaafce143d Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Mon, 4 Apr 2011 21:13:34 +0000 Subject: [PATCH] Fixup a few undefined variables and alike while checking REL1_17 --- includes/Feed.php | 2 +- includes/ImagePage.php | 2 -- includes/api/ApiQueryImageInfo.php | 6 +++--- includes/db/DatabaseIbm_db2.php | 2 +- maintenance/checkUsernames.php | 2 +- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/includes/Feed.php b/includes/Feed.php index 7938803e13..0ca419ed76 100644 --- a/includes/Feed.php +++ b/includes/Feed.php @@ -101,7 +101,7 @@ class FeedItem { */ public function setUniqueId($uniqueId, $RSSisPermalink = false) { $this->UniqueId = $uniqueId; - $this->RSSIsPermalink = $isPermalink; + $this->RSSIsPermalink = $RSSisPermalink; } /** diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 3d059ca7e7..176c97d03e 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -535,8 +535,6 @@ EOT * @param int $height */ private function makeSizeLink( $params, $width, $height ) { - global $wgLang; - $params['width'] = $width; $params['height'] = $height; $thumbnail = $this->displayImg->transform( $params ); diff --git a/includes/api/ApiQueryImageInfo.php b/includes/api/ApiQueryImageInfo.php index c3cce33676..771430561b 100644 --- a/includes/api/ApiQueryImageInfo.php +++ b/includes/api/ApiQueryImageInfo.php @@ -107,7 +107,7 @@ class ApiQueryImageInfo extends ApiQueryBase { } break; } - + // Check if we can make the requested thumbnail, and get transform parameters. $finalThumbParams = $this->mergeThumbParams( $img, $scale, $params['urlparam'] ); @@ -119,7 +119,7 @@ class ApiQueryImageInfo extends ApiQueryBase { ( is_null( $params['end'] ) || $img->getTimestamp() >= $params['end'] ) ) { $gotOne = true; - + $fit = $this->addPageSubItem( $pageId, self::getInfo( $img, $prop, $result, $finalThumbParams ) ); if ( !$fit ) { @@ -383,7 +383,7 @@ class ApiQueryImageInfo extends ApiQueryBase { if ( $mime ) { $vals['mime'] = $file->getMimeType(); } - + if ( $mediatype ) { $vals['mediatype'] = $file->getMediaType(); } diff --git a/includes/db/DatabaseIbm_db2.php b/includes/db/DatabaseIbm_db2.php index 810b823431..3eb06cb435 100644 --- a/includes/db/DatabaseIbm_db2.php +++ b/includes/db/DatabaseIbm_db2.php @@ -932,7 +932,7 @@ EOF; $overhead = "SAVEPOINT $ignore ON ROLLBACK RETAIN CURSORS"; db2_exec( $this->mConn, $overhead, $this->mStmtOptions ); - $this->execute( $stmt, $row ); + $res2 = $this->execute( $stmt, $row ); if ( !$res2 ) { $this->installPrint( 'Last error:' ); diff --git a/maintenance/checkUsernames.php b/maintenance/checkUsernames.php index b368432aca..d6f9ca1543 100644 --- a/maintenance/checkUsernames.php +++ b/maintenance/checkUsernames.php @@ -45,7 +45,7 @@ class CheckUsernames extends Maintenance { foreach ( $res as $row ) { if ( ! User::isValidUserName( $row->user_name ) ) { $this->error( sprintf( "%s: %6d: '%s'\n", wfWikiID(), $row->user_id, $row->user_name ) ); - wfDebugLog( 'checkUsernames', $out ); + wfDebugLog( 'checkUsernames', $$row->user_name ); } } } -- 2.20.1