Merge "Improve docs for Title::getInternalURL/getCanonicalURL"
[lhc/web/wiklou.git] / includes / page / ImagePage.php
index 76b2de0..6c1ac39 100644 (file)
@@ -321,9 +321,7 @@ class ImagePage extends Article {
                $dirmark = $lang->getDirMarkEntity();
                $request = $this->getContext()->getRequest();
 
-               $max = $this->getImageLimitsFromOption( $user, 'imagesize' );
-               $maxWidth = $max[0];
-               $maxHeight = $max[1];
+               list( $maxWidth, $maxHeight ) = $this->getImageLimitsFromOption( $user, 'imagesize' );
 
                if ( $this->displayImg->exists() ) {
                        # image
@@ -357,7 +355,7 @@ class ImagePage extends Article {
                                # image
                                # "Download high res version" link below the image
                                # $msgsize = $this->getContext()->msg( 'file-info-size', $width_orig, $height_orig,
-                               #   Linker::formatSize( $this->displayImg->getSize() ), $mime )->escaped();
+                               #   Language::formatSize( $this->displayImg->getSize() ), $mime )->escaped();
                                # We'll show a thumbnail of this image
                                if ( $width > $maxWidth || $height > $maxHeight || $this->displayImg->isVectorized() ) {
                                        list( $width, $height ) = $this->getDisplayWidthHeight(
@@ -1029,7 +1027,7 @@ EOT
         *
         * @param User $user
         * @param string $optionName Name of a option to check, typically imagesize or thumbsize
-        * @return array
+        * @return int[]
         * @since 1.21
         */
        public function getImageLimitsFromOption( $user, $optionName ) {
@@ -1224,7 +1222,7 @@ EOT
         * @return TitleArray|Title[]
         */
        public function getForeignCategories() {
-               $this->mPage->getForeignCategories();
+               return $this->mPage->getForeignCategories();
        }
 
 }