From 8566872b1da19553c6d8161185a3930590e20fdc Mon Sep 17 00:00:00 2001 From: Russ Nelson Date: Mon, 21 Mar 2011 18:38:45 +0000 Subject: [PATCH] Some docs, a spelin eror and fixing a mw1.15 compatibility bug. --- includes/filerepo/FileRepo.php | 2 ++ includes/filerepo/README | 18 ++++++++++++++++++ includes/filerepo/RepoGroup.php | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php index f2bde0c59d..7314e116dd 100644 --- a/includes/filerepo/FileRepo.php +++ b/includes/filerepo/FileRepo.php @@ -108,6 +108,7 @@ abstract class FileRepo { if ( !is_array( $options ) ) { // MW 1.15 compat $time = $options; + $options = array(); } else { $time = isset( $options['time'] ) ? $options['time'] : false; } @@ -218,6 +219,7 @@ abstract class FileRepo { if ( !is_array( $options ) ) { # MW 1.15 compat $time = $options; + $options = array(); } else { $time = isset( $options['time'] ) ? $options['time'] : false; } diff --git a/includes/filerepo/README b/includes/filerepo/README index d3aea9f0c7..db46ff8ab6 100644 --- a/includes/filerepo/README +++ b/includes/filerepo/README @@ -39,3 +39,21 @@ LocalRepo.php. LocalRepo provides only file access, and LocalFile provides database access and higher-level functions such as cache management. Tim Starling, June 2007 + +Structure: + +File.php defines an abstract class File. + ForeignAPIFile.php extends File. + LocalFile.php extends File. + ForeignDBFile.php extends LocalFile + Image.php extends LocalFile + UnregisteredLocalFile.php extends File. +FileRepo.php defined an abstract class FileRepo. + ForeignAPIRepo.php extends FileRepo + FSRepo extends FileRepo + LocalRepo.php extends FSRepo + ForeignDBRepo.php extends LocalRepo + ForeignDBViaLBRepo.php extends LocalRepo + NullRepo extends FileRepo + +Russ Nelson, March 2011 diff --git a/includes/filerepo/RepoGroup.php b/includes/filerepo/RepoGroup.php index c3ab04162e..2d0b1ac84b 100644 --- a/includes/filerepo/RepoGroup.php +++ b/includes/filerepo/RepoGroup.php @@ -344,7 +344,7 @@ class RepoGroup { */ function splitVirtualUrl( $url ) { if ( substr( $url, 0, 9 ) != 'mwrepo://' ) { - throw new MWException( __METHOD__.': unknown protoocl' ); + throw new MWException( __METHOD__.': unknown protocol' ); } $bits = explode( '/', substr( $url, 9 ), 3 ); -- 2.20.1