Add support for Number grouping(commafy) based on CLDR number grouping patterns like...
[lhc/web/wiklou.git] / includes / ImagePage.php
index 6f7ad74..9a017da 100644 (file)
@@ -323,11 +323,13 @@ class ImagePage extends Article {
                                        $msgsmall = wfMessage( 'show-big-image-preview' )->
                                                rawParams( $this->makeSizeLink( $params, $width, $height ) )->
                                                parse() . ' ' .
-                                               wfMessage( 'show-big-image-other' )->
-                                               rawParams( $wgLang->pipeList( $otherSizes ) )->parse();
+                                               Html::rawElement( 'span', array( 'class' => 'mw-filepage-other-resolutions' ),
+                                                       wfMessage( 'show-big-image-other' )->
+                                                       rawParams( $wgLang->pipeList( $otherSizes ), count( $otherSizes ) )->parse()
+                                               );
                                } else {
                                        # Image is small enough to show full size on image page
-                                       $msgsmall = wfMsgExt( 'file-nohires', array( 'parseinline' ) );
+                                       $msgsmall = wfMessage( 'file-nohires' )->parse();
                                }
 
                                $params['width'] = $width;
@@ -335,7 +337,7 @@ class ImagePage extends Article {
                                $thumbnail = $this->displayImg->transform( $params );
 
                                $showLink = true;
-                               $anchorclose = '<br />' . $msgsmall;
+                               $anchorclose = Html::rawElement( 'div', array( 'class' => 'mw-filepage-resolutioninfo' ), $msgsmall );
 
                                $isMulti = $this->displayImg->isMultipage() && $this->displayImg->pageCount() > 1;
                                if ( $isMulti ) {
@@ -784,6 +786,8 @@ EOT
 
        /**
         * Display an error with a wikitext description
+        *
+        * @param $description String
         */
        function showError( $description ) {
                global $wgOut;
@@ -883,7 +887,7 @@ class ImageHistoryList {
         * @return string
         */
        public function imageHistoryLine( $iscur, $file ) {
-               global $wgUser, $wgLang;
+               global $wgUser, $wgLang, $wgContLang;
 
                $timestamp = wfTimestamp( TS_MW, $file->getTimestamp() );
                $img = $iscur ? $file->getName() : $file->getArchiveName();
@@ -1014,15 +1018,14 @@ class ImageHistoryList {
                                $row .= htmlspecialchars( $usertext );
                        }
                }
-               $row .= '</td><td>';
+               $row .= '</td>';
 
                // Don't show deleted descriptions
                if ( $file->isDeleted( File::DELETED_COMMENT ) ) {
-                       $row .= '<span class="history-deleted">' . wfMsgHtml( 'rev-deleted-comment' ) . '</span>';
+                       $row .= '<td><span class="history-deleted">' . wfMsgHtml( 'rev-deleted-comment' ) . '</span></td>';
                } else {
-                       $row .= Linker::commentBlock( $description, $this->title );
+                       $row .= '<td dir="' . $wgContLang->getDir() . '">' . Linker::commentBlock( $description, $this->title ) . '</td>';
                }
-               $row .= '</td>';
 
                $rowClass = null;
                wfRunHooks( 'ImagePageFileHistoryLine', array( $this, $file, &$row, &$rowClass ) );