Some docs, a spelin eror and fixing a mw1.15 compatibility bug.
authorRuss Nelson <nelson@users.mediawiki.org>
Mon, 21 Mar 2011 18:38:45 +0000 (18:38 +0000)
committerRuss Nelson <nelson@users.mediawiki.org>
Mon, 21 Mar 2011 18:38:45 +0000 (18:38 +0000)
includes/filerepo/FileRepo.php
includes/filerepo/README
includes/filerepo/RepoGroup.php

index f2bde0c..7314e11 100644 (file)
@@ -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;
                }
index d3aea9f..db46ff8 100644 (file)
@@ -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
index c3ab041..2d0b1ac 100644 (file)
@@ -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 );