Commenting and doc fixes around the spam regexes
[lhc/web/wiklou.git] / includes / ImagePage.php
old mode 100644 (file)
new mode 100755 (executable)
index e687046..5fa44d5
@@ -250,7 +250,7 @@ class ImagePage extends Article {
         *
         * @todo FIXME: Bad interface, see note on MediaHandler::formatMetadata().
         *
-        * @param array $metadata the array containing the EXIF data
+        * @param array $metadata the array containing the Exif data
         * @return String The metadata table. This is treated as Wikitext (!)
         */
        protected function makeMetadataTable( $metadata ) {
@@ -311,6 +311,12 @@ class ImagePage extends Article {
                        } else {
                                $params = array( 'page' => $page );
                        }
+
+                       $renderLang = $request->getVal( 'lang' );
+                       if ( !is_null( $renderLang ) ) {
+                               $params['lang'] = $renderLang;
+                       }
+
                        $width_orig = $this->displayImg->getWidth( $page );
                        $width = $width_orig;
                        $height_orig = $this->displayImg->getHeight( $page );
@@ -395,6 +401,7 @@ class ImagePage extends Article {
 
                                $isMulti = $this->displayImg->isMultipage() && $this->displayImg->pageCount() > 1;
                                if ( $isMulti ) {
+                                       $out->addModules( 'mediawiki.page.image.pagination' );
                                        $out->addHTML( '<table class="multipageimage"><tr><td>' );
                                }
 
@@ -444,7 +451,6 @@ class ImagePage extends Article {
                                        $formParams = array(
                                                'name' => 'pageselector',
                                                'action' => $wgScript,
-                                               'onchange' => 'document.pageselector.submit();',
                                        );
                                        $options = array();
                                        for ( $i = 1; $i <= $count; $i++ ) {