* Use 'new self' instead of hard-coded class name
authorAaron Schulz <aaron@users.mediawiki.org>
Mon, 7 Nov 2011 20:22:57 +0000 (20:22 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Mon, 7 Nov 2011 20:22:57 +0000 (20:22 +0000)
* Added constructor comment

includes/filerepo/UnregisteredLocalFile.php

index f0eeec0..6a0e097 100644 (file)
@@ -32,7 +32,7 @@ class UnregisteredLocalFile extends File {
         * @return UnregisteredLocalFile
         */
        static function newFromPath( $path, $mime ) {
-               return new UnregisteredLocalFile( false, false, $path, $mime );
+               return new self( false, false, $path, $mime );
        }
 
        /**
@@ -41,10 +41,13 @@ class UnregisteredLocalFile extends File {
         * @return UnregisteredLocalFile
         */
        static function newFromTitle( $title, $repo ) {
-               return new UnregisteredLocalFile( $title, $repo, false, false );
+               return new self( $title, $repo, false, false );
        }
 
        /**
+        * Create an UnregisteredLocalFile based on a path or a (title,repo) pair.
+        * A FileRepo object is not required here, unlike most other File classes.
+        * 
         * @throws MWException
         * @param $title Title|false
         * @param $repo FSRepo