r76118 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76117‎ | r76118 | r76119 >
Date:18:01, 5 November 2010
Author:nikerabbit
Status:ok
Tags:
Comment:
Follow-up r76113, r76114: undeclared global, unnecessary global + some whitespace fixes
Modified paths:
  • /trunk/phase3/includes/filerepo/ForeignAPIFile.php (modified) (history)
  • /trunk/phase3/includes/filerepo/ForeignAPIRepo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/ForeignAPIRepo.php
@@ -36,6 +36,7 @@
3737
3838 function __construct( $info ) {
3939 parent::__construct( $info );
 40+ global $wgUploadDirectory;
4041
4142 // http://commons.wikimedia.org/w/api.php
4243 $this->mApiBase = isset( $info['apibase'] ) ? $info['apibase'] : null;
Index: trunk/phase3/includes/filerepo/ForeignAPIFile.php
@@ -66,9 +66,9 @@
6767 return parent::transform( $params, $flags );
6868 }
6969 $thumbUrl = $this->repo->getThumbUrlFromCache(
70 - $this->getName(),
71 - isset( $params['width'] ) ? $params['width'] : -1,
72 - isset( $params['height'] ) ? $params['height'] : -1 );
 70+ $this->getName(),
 71+ isset( $params['width'] ) ? $params['width'] : -1,
 72+ isset( $params['height'] ) ? $params['height'] : -1 );
7373 return $this->handler->getTransform( $this, 'bogus', $thumbUrl, $params );
7474 }
7575
@@ -154,16 +154,14 @@
155155 */
156156 function getThumbPath( $suffix = '' ) {
157157 if ( $this->repo->canCacheThumbs() ) {
158 - global $wgUploadDirectory;
159158 $path = $this->repo->getZonePath('thumb') . '/' . $this->getHashPath( $this->getName() );
160159 if ( $suffix ) {
161160 $path = $path . $suffix . '/';
162161 }
163162 return $path;
 163+ } else {
 164+ return null;
164165 }
165 - else {
166 - return null;
167 - }
168166 }
169167
170168 function getThumbnails() {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r76113InstantCommons path and url cleanup...hartman16:31, 5 November 2010
r76114InstantCommons...hartman16:36, 5 November 2010

Status & tagging log