From 88af89dab2fb723b460dca08eabb5e5d8c68c92a Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Tue, 17 Feb 2009 22:35:36 +0000 Subject: [PATCH] Override FileRepo::newFile() when $time is set. See docs on parent. --- includes/filerepo/ForeignAPIRepo.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/includes/filerepo/ForeignAPIRepo.php b/includes/filerepo/ForeignAPIRepo.php index 6fc9c46528..23572a4d9d 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 -- 2.20.1