r84470 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84469‎ | r84470 | r84471 >
Date:18:38, 21 March 2011
Author:nelson
Status:ok (Comments)
Tags:
Comment:
Some docs, a spelin eror and fixing a mw1.15 compatibility bug.
Modified paths:
  • /trunk/phase3/includes/filerepo/FileRepo.php (modified) (history)
  • /trunk/phase3/includes/filerepo/README (modified) (history)
  • /trunk/phase3/includes/filerepo/RepoGroup.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/FileRepo.php
@@ -108,6 +108,7 @@
109109 if ( !is_array( $options ) ) {
110110 // MW 1.15 compat
111111 $time = $options;
 112+ $options = array();
112113 } else {
113114 $time = isset( $options['time'] ) ? $options['time'] : false;
114115 }
@@ -218,6 +219,7 @@
219220 if ( !is_array( $options ) ) {
220221 # MW 1.15 compat
221222 $time = $options;
 223+ $options = array();
222224 } else {
223225 $time = isset( $options['time'] ) ? $options['time'] : false;
224226 }
Index: trunk/phase3/includes/filerepo/README
@@ -39,3 +39,21 @@
4040 database access and higher-level functions such as cache management.
4141
4242 Tim Starling, June 2007
 43+
 44+Structure:
 45+
 46+File.php defines an abstract class File.
 47+ ForeignAPIFile.php extends File.
 48+ LocalFile.php extends File.
 49+ ForeignDBFile.php extends LocalFile
 50+ Image.php extends LocalFile
 51+ UnregisteredLocalFile.php extends File.
 52+FileRepo.php defined an abstract class FileRepo.
 53+ ForeignAPIRepo.php extends FileRepo
 54+ FSRepo extends FileRepo
 55+ LocalRepo.php extends FSRepo
 56+ ForeignDBRepo.php extends LocalRepo
 57+ ForeignDBViaLBRepo.php extends LocalRepo
 58+ NullRepo extends FileRepo
 59+
 60+Russ Nelson, March 2011
Index: trunk/phase3/includes/filerepo/RepoGroup.php
@@ -344,7 +344,7 @@
345345 */
346346 function splitVirtualUrl( $url ) {
347347 if ( substr( $url, 0, 9 ) != 'mwrepo://' ) {
348 - throw new MWException( __METHOD__.': unknown protoocl' );
 348+ throw new MWException( __METHOD__.': unknown protocol' );
349349 }
350350
351351 $bits = explode( '/', substr( $url, 9 ), 3 );

Follow-up revisions

RevisionCommit summaryAuthorDate
r84506Followup r84470, fill "MW 1.15 compat"reedy00:24, 22 March 2011

Comments

#Comment by Reedy (talk | contribs)   21:30, 21 March 2011

Who cares about 1.15? :D

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

That's fine enough; let's delete the compatibility code. Either way the code I fixed was wrong previously.

Status & tagging log