r76114 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76113‎ | r76114 | r76115 >
Date:16:36, 5 November 2010
Author:hartman
Status:ok
Tags:
Comment:
InstantCommons
* Use dbkey form of title, not textual form.
* Use getZonePath() from the repo.
Modified paths:
  • /trunk/phase3/includes/filerepo/ForeignAPIFile.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/ForeignAPIFile.php
@@ -24,7 +24,7 @@
2525
2626 static function newFromTitle( $title, $repo ) {
2727 $data = $repo->fetchImageQuery( array(
28 - 'titles' => 'File:' . $title->getText(),
 28+ 'titles' => 'File:' . $title->getDBKey(),
2929 'iiprop' => self::getProps(),
3030 'prop' => 'imageinfo' ) );
3131
@@ -155,7 +155,7 @@
156156 function getThumbPath( $suffix = '' ) {
157157 if ( $this->repo->canCacheThumbs() ) {
158158 global $wgUploadDirectory;
159 - $path = $wgUploadDirectory . '/thumb/' . $this->getHashPath( $this->getName() );
 159+ $path = $this->repo->getZonePath('thumb') . '/' . $this->getHashPath( $this->getName() );
160160 if ( $suffix ) {
161161 $path = $path . $suffix . '/';
162162 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r76118Follow-up r76113, r76114: undeclared global, unnecessary global + some whites...nikerabbit18:01, 5 November 2010

Status & tagging log