From: Derk-Jan Hartman Date: Fri, 5 Nov 2010 16:36:50 +0000 (+0000) Subject: InstantCommons X-Git-Tag: 1.31.0-rc.0~34071 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/?a=commitdiff_plain;h=f7b65f9cee8a32a36a518a00444e6d492df6d493;p=lhc%2Fweb%2Fwiklou.git InstantCommons * Use dbkey form of title, not textual form. * Use getZonePath() from the repo. --- 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 . '/'; }