From 63601400e476c6cf43d985f3e7b9864681695ed4 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 18 Jan 2013 16:46:04 +0100 Subject: Update to MediaWiki 1.20.2 this update includes: * adjusted Arch Linux skin * updated FluxBBAuthPlugin * patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024 --- includes/filerepo/file/UnregisteredLocalFile.php | 57 +++++++++++++++++++++--- 1 file changed, 50 insertions(+), 7 deletions(-) (limited to 'includes/filerepo/file/UnregisteredLocalFile.php') diff --git a/includes/filerepo/file/UnregisteredLocalFile.php b/includes/filerepo/file/UnregisteredLocalFile.php index cd9d3d02..8d4a3f88 100644 --- a/includes/filerepo/file/UnregisteredLocalFile.php +++ b/includes/filerepo/file/UnregisteredLocalFile.php @@ -1,6 +1,21 @@ dims = array(); } + /** + * @param $page int + * @return bool + */ private function cachePageDimensions( $page = 1 ) { if ( !isset( $this->dims[$page] ) ) { if ( !$this->getHandler() ) { @@ -89,16 +108,27 @@ class UnregisteredLocalFile extends File { return $this->dims[$page]; } + /** + * @param $page int + * @return number + */ function getWidth( $page = 1 ) { $dim = $this->cachePageDimensions( $page ); return $dim['width']; } + /** + * @param $page int + * @return number + */ function getHeight( $page = 1 ) { $dim = $this->cachePageDimensions( $page ); return $dim['height']; } + /** + * @return bool|string + */ function getMimeType() { if ( !isset( $this->mime ) ) { $magic = MimeMagic::singleton(); @@ -107,6 +137,10 @@ class UnregisteredLocalFile extends File { return $this->mime; } + /** + * @param $filename String + * @return Array|bool + */ function getImageSize( $filename ) { if ( !$this->getHandler() ) { return false; @@ -114,6 +148,9 @@ class UnregisteredLocalFile extends File { return $this->handler->getImageSize( $this, $this->getLocalRefPath() ); } + /** + * @return bool + */ function getMetadata() { if ( !isset( $this->metadata ) ) { if ( !$this->getHandler() ) { @@ -125,6 +162,9 @@ class UnregisteredLocalFile extends File { return $this->metadata; } + /** + * @return bool|string + */ function getURL() { if ( $this->repo ) { return $this->repo->getZoneUrl( 'public' ) . '/' . @@ -134,6 +174,9 @@ class UnregisteredLocalFile extends File { } } + /** + * @return bool|int + */ function getSize() { $this->assertRepoDefined(); $props = $this->repo->getFileProps( $this->path ); -- cgit v1.2.3-54-g00ecf