From 72e90545454c0e014318fa3c81658e035aac58c1 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 10 Jun 2009 13:00:47 +0200 Subject: applying patch to version 1.15.0 --- includes/filerepo/ForeignAPIRepo.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'includes/filerepo/ForeignAPIRepo.php') diff --git a/includes/filerepo/ForeignAPIRepo.php b/includes/filerepo/ForeignAPIRepo.php index 6fc9c465..e63e4a6b 100644 --- a/includes/filerepo/ForeignAPIRepo.php +++ b/includes/filerepo/ForeignAPIRepo.php @@ -30,6 +30,17 @@ class ForeignAPIRepo extends FileRepo { $this->scriptDirUrl = dirname( $this->mApiBase ); } } + + /** + * Per docs in FileRepo, this needs to return false if we don't support versioned + * files. Well, we don't. + */ + function newFile( $title, $time = false ) { + if ( $time ) { + return false; + } + return parent::newFile( $title, $time ); + } /** * No-ops @@ -109,7 +120,7 @@ class ForeignAPIRepo extends FileRepo { $ret = array(); if ( isset( $results['query']['allimages'] ) ) { foreach ( $results['query']['allimages'] as $img ) { - $ret[] = new ForeignAPIFile( Title::makeTitle( NS_IMAGE, $img['name'] ), $this, $img ); + $ret[] = new ForeignAPIFile( Title::makeTitle( NS_FILE, $img['name'] ), $this, $img ); } } return $ret; -- cgit v1.2.3-54-g00ecf