Restore factory function to avoid gratuitously breaking extensions for no reason...
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 12 Jul 2006 06:39:55 +0000 (06:39 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 12 Jul 2006 06:39:55 +0000 (06:39 +0000)
includes/Image.php

index c5cf3e9..fd0f8a3 100644 (file)
@@ -66,6 +66,14 @@ class Image
                }
        }
 
+       /**
+        * Obsolete factory function, use constructor
+        * @deprecated
+        */
+       function newFromTitle( $title ) {
+               return new Image( $title );
+       }
+
        function Image( $title ) {
                if( !is_object( $title ) ) {
                        throw new MWException( 'Image constructor given bogus title.' );