From: Brian Wolff Date: Sat, 24 May 2014 17:27:36 +0000 (-0300) Subject: Fix docs on File::getImageSize() they were very misleading X-Git-Tag: 1.31.0-rc.0~15574^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=3045c722a97bb69499f92c4bcf88714b6b339e38;p=lhc%2Fweb%2Fwiklou.git Fix docs on File::getImageSize() they were very misleading Change-Id: I2a3e1e8c10da7ade4ea713a561e05fd4ab9203c8 --- diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php index 5895ddad46..a45cd72395 100644 --- a/includes/filerepo/file/File.php +++ b/includes/filerepo/file/File.php @@ -1728,17 +1728,20 @@ abstract class File { /** * Get an image size array like that returned by getImageSize(), or false if it - * can't be determined. + * can't be determined. Loads the image size directly from the file ignoring caches. * - * @param string $fileName The filename - * @return array + * @note Use getWidth()/getHeight() instead of this method unless you have a + * a good reason. This method skips all caches. + * + * @param string $fileName The path to the file (e.g. From getLocalPathRef() ) + * @return array The width, followed by height, with optionally more things after */ - function getImageSize( $fileName ) { + function getImageSize( $filePath ) { if ( !$this->getHandler() ) { return false; } - return $this->handler->getImageSize( $this, $fileName ); + return $this->handler->getImageSize( $this, $filePath ); } /**