static function newFromTitle( $title, $repo ) {
$data = $repo->fetchImageQuery( array(
- 'titles' => 'File:' . $title->getText(),
+ 'titles' => 'File:' . $title->getDBKey(),
'iiprop' => self::getProps(),
'prop' => 'imageinfo' ) );
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 . '/';
}