X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/mediawiki.git/blobdiff_plain/74c929b24b048c9f1e31e17db757ae4195cd7673..dc9cc5d707f5a612938cc9371614cc41c328fda2:/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;