From f7b65f9cee8a32a36a518a00444e6d492df6d493 Mon Sep 17 00:00:00 2001 From: Derk-Jan Hartman Date: Fri, 5 Nov 2010 16:36:50 +0000 Subject: [PATCH] InstantCommons * Use dbkey form of title, not textual form. * Use getZonePath() from the repo. --- includes/filerepo/ForeignAPIFile.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/filerepo/ForeignAPIFile.php b/includes/filerepo/ForeignAPIFile.php index 464a852e57..d1e38ea26b 100644 --- a/includes/filerepo/ForeignAPIFile.php +++ b/includes/filerepo/ForeignAPIFile.php @@ -24,7 +24,7 @@ class ForeignAPIFile extends File { static function newFromTitle( $title, $repo ) { $data = $repo->fetchImageQuery( array( - 'titles' => 'File:' . $title->getText(), + 'titles' => 'File:' . $title->getDBKey(), 'iiprop' => self::getProps(), 'prop' => 'imageinfo' ) ); @@ -155,7 +155,7 @@ class ForeignAPIFile extends File { function getThumbPath( $suffix = '' ) { if ( $this->repo->canCacheThumbs() ) { global $wgUploadDirectory; - $path = $wgUploadDirectory . '/thumb/' . $this->getHashPath( $this->getName() ); + $path = $this->repo->getZonePath('thumb') . '/' . $this->getHashPath( $this->getName() ); if ( $suffix ) { $path = $path . $suffix . '/'; } -- 2.20.1