Followup r84470, fill "MW 1.15 compat"
authorSam Reed <reedy@users.mediawiki.org>
Tue, 22 Mar 2011 00:24:17 +0000 (00:24 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Tue, 22 Mar 2011 00:24:17 +0000 (00:24 +0000)
includes/filerepo/FileRepo.php

index 7314e11..4ad6af5 100644 (file)
@@ -105,13 +105,7 @@ abstract class FileRepo {
         *                     be found.
         */
        function findFile( $title, $options = array() ) {
-               if ( !is_array( $options ) ) {
-                       // MW 1.15 compat
-                       $time = $options;
-                       $options = array();
-               } else {
-                       $time = isset( $options['time'] ) ? $options['time'] : false;
-               }
+               $time = isset( $options['time'] ) ? $options['time'] : false;
                if ( !($title instanceof Title) ) {
                        $title = Title::makeTitleSafe( NS_FILE, $title );
                        if ( !is_object( $title ) ) {
@@ -216,13 +210,7 @@ abstract class FileRepo {
         * @param $options Option array, same as findFile().
         */
        function findFileFromKey( $sha1, $options = array() ) {
-               if ( !is_array( $options ) ) {
-                       # MW 1.15 compat
-                       $time = $options;
-                       $options = array();
-               } else {
-                       $time = isset( $options['time'] ) ? $options['time'] : false;
-               }
+               $time = isset( $options['time'] ) ? $options['time'] : false;
 
                # First try the current version of the file to see if it precedes the timestamp
                $img = $this->newFileFromKey( $sha1 );