From: Alexandre Emsenhuber Date: Sat, 2 Apr 2011 09:34:22 +0000 (+0000) Subject: Removed deprecated Image class per documentation; no use in core or extensions X-Git-Tag: 1.31.0-rc.0~31080 X-Git-Url: http://git.cyclocoop.org/%27.%28%24current%20%3E%202?a=commitdiff_plain;h=9c03e7f7baf7515e459594e7fe02040fe358df25;p=lhc%2Fweb%2Fwiklou.git Removed deprecated Image class per documentation; no use in core or extensions --- diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 6a3d35a5a6..7e4ecf17db 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -438,7 +438,6 @@ $wgAutoloadLocalClasses = array( 'ForeignDBRepo' => 'includes/filerepo/ForeignDBRepo.php', 'ForeignDBViaLBRepo' => 'includes/filerepo/ForeignDBViaLBRepo.php', 'FSRepo' => 'includes/filerepo/FSRepo.php', - 'Image' => 'includes/filerepo/Image.php', 'LocalFile' => 'includes/filerepo/LocalFile.php', 'LocalFileDeleteBatch' => 'includes/filerepo/LocalFile.php', 'LocalFileMoveBatch' => 'includes/filerepo/LocalFile.php', diff --git a/includes/filerepo/Image.php b/includes/filerepo/Image.php deleted file mode 100644 index 59a07ef9a8..0000000000 --- a/includes/filerepo/Image.php +++ /dev/null @@ -1,80 +0,0 @@ -getLocalRepo(); - parent::__construct( $title, $repo ); - } - - /** - * Wrapper for wfFindFile(), for backwards-compatibility only - * Do not use in core code. - * @deprecated - */ - static function newFromTitle( $title, $repo, $time = null ) { - wfDeprecated( __METHOD__ ); - $img = wfFindFile( $title, array( 'time' => $time ) ); - if ( !$img ) { - $img = wfLocalFile( $title ); - } - return $img; - } - - /** - * Wrapper for wfFindFile(), for backwards-compatibility only. - * Do not use in core code. - * - * @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 - */ - static function newFromName( $name ) { - wfDeprecated( __METHOD__ ); - $title = Title::makeTitleSafe( NS_FILE, $name ); - if ( is_object( $title ) ) { - $img = wfFindFile( $title ); - if ( !$img ) { - $img = wfLocalFile( $title ); - } - return $img; - } else { - return null; - } - } - - /** - * Return the URL of an image, provided its name. - * - * Backwards-compatibility for extensions. - * Note that fromSharedDirectory will only use the shared path for files - * that actually exist there now, and will return local paths otherwise. - * - * @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 - */ - static function imageUrl( $name, $fromSharedDirectory = false ) { - wfDeprecated( __METHOD__ ); - $image = null; - if( $fromSharedDirectory ) { - $image = wfFindFile( $name ); - } - if( !$image ) { - $image = wfLocalFile( $name ); - } - return $image->getUrl(); - } -}