r84506 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84505‎ | r84506 | r84507 >
Date:00:24, 22 March 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Followup r84470, fill "MW 1.15 compat"
Modified paths:
  • /trunk/phase3/includes/filerepo/FileRepo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/FileRepo.php
@@ -105,13 +105,7 @@
106106 * be found.
107107 */
108108 function findFile( $title, $options = array() ) {
109 - if ( !is_array( $options ) ) {
110 - // MW 1.15 compat
111 - $time = $options;
112 - $options = array();
113 - } else {
114 - $time = isset( $options['time'] ) ? $options['time'] : false;
115 - }
 109+ $time = isset( $options['time'] ) ? $options['time'] : false;
116110 if ( !($title instanceof Title) ) {
117111 $title = Title::makeTitleSafe( NS_FILE, $title );
118112 if ( !is_object( $title ) ) {
@@ -216,13 +210,7 @@
217211 * @param $options Option array, same as findFile().
218212 */
219213 function findFileFromKey( $sha1, $options = array() ) {
220 - if ( !is_array( $options ) ) {
221 - # MW 1.15 compat
222 - $time = $options;
223 - $options = array();
224 - } else {
225 - $time = isset( $options['time'] ) ? $options['time'] : false;
226 - }
 214+ $time = isset( $options['time'] ) ? $options['time'] : false;
227215
228216 # First try the current version of the file to see if it precedes the timestamp
229217 $img = $this->newFileFromKey( $sha1 );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r84470Some docs, a spelin eror and fixing a mw1.15 compatibility bug.nelson18:38, 21 March 2011

Comments

#Comment by Reedy (talk | contribs)   00:24, 22 March 2011

Fill? Kill!!

Status & tagging log