]> scripts.mit.edu Git - autoinstalls/mediawiki.git/blobdiff - includes/filerepo/Image.php
MediaWiki 1.17.4
[autoinstalls/mediawiki.git] / includes / filerepo / Image.php
index 5207bb4bff54a7446946f4f3b740c0301be74958..59a07ef9a8591fa8658484f836beba9d8cdb3a16 100644 (file)
@@ -1,8 +1,14 @@
 <?php
+/**
+ * Backward compatibility code for MW < 1.11
+ *
+ * @file
+ */
 
 /**
  * Backwards compatibility class
- * @deprecated
+ *
+ * @deprecated. Will be removed in 1.18!
  * @ingroup FileRepo
  */
 class Image extends LocalFile {
@@ -17,9 +23,9 @@ class Image extends LocalFile {
         * Do not use in core code.
         * @deprecated
         */
-       static function newFromTitle( $title, $time = false ) {
+       static function newFromTitle( $title, $repo, $time = null ) {
                wfDeprecated( __METHOD__ );
-               $img = wfFindFile( $title, $time );
+               $img = wfFindFile( $title, array( 'time' => $time ) );
                if ( !$img ) {
                        $img = wfLocalFile( $title );
                }
@@ -30,7 +36,7 @@ class Image extends LocalFile {
         * Wrapper for wfFindFile(), for backwards-compatibility only.
         * Do not use in core code.
         *
-        * @param string $name name of the image, used to create a title object using Title::makeTitleSafe
+        * @param $name String: name of the image, used to create a title object using Title::makeTitleSafe
         * @return image object or null if invalid title
         * @deprecated
         */
@@ -44,7 +50,7 @@ class Image extends LocalFile {
                        }
                        return $img;
                } else {
-                       return NULL;
+                       return null;
                }
        }
 
@@ -55,8 +61,8 @@ class Image extends LocalFile {
         * Note that fromSharedDirectory will only use the shared path for files
         * that actually exist there now, and will return local paths otherwise.
         *
-        * @param string $name  Name of the image, without the leading "Image:"
-        * @param boolean $fromSharedDirectory  Should this be in $wgSharedUploadPath?
+        * @param $name String: name of the image, without the leading "Image:"
+        * @param $fromSharedDirectory Boolean: Should this be in $wgSharedUploadPath?
         * @return string URL of $name image
         * @deprecated
         */