Wikify some image messages:
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 9 May 2008 18:40:52 +0000 (18:40 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 9 May 2008 18:40:52 +0000 (18:40 +0000)
* linkstoimage
* nolinkstoimage
* redirectstofile

Two of these were previously raw-HTML paragraphs, and had div classes stuck on them on eg English Wikipedia.

r34507 changed them into plaintext, breaking them.

Since image pages are already swathed with little wiki bits (meta table, other various bits), shouldn't be any harm in making these properly flexible wiki messages.

includes/ImagePage.php

index c77c077..400fea9 100644 (file)
@@ -537,11 +537,11 @@ EOT
                );
 
                if ( 0 == $dbr->numRows( $res ) ) {
-                       $wgOut->addHtml( Xml::element('p', null ,wfMsg( "nolinkstoimage" ) )."\n" );
+                       $wgOut->addWikiMsg( 'nolinkstoimage' );
                        return;
                }
-               $wgOut->addHTML( Xml::element('p', null, wfMsg( 'linkstoimage' ) )."\n" );
-               $wgOut->addHTML( Xml::openElement( 'ul' ));
+               $wgOut->addWikiMsg( 'linkstoimage' );
+               $wgOut->addHTML( "<ul>\n" );
 
                $sk = $wgUser->getSkin();
                $count = 0;
@@ -559,7 +559,7 @@ EOT
                
                // Add a links to [[Special:Whatlinkshere]]
                if ( $count > $limit )
-                       $wgOut->addWikiText( wfMsg( 'morelinkstoimage', $this->mTitle->getPrefixedDBkey() ) );
+                       $wgOut->addWikiMsg( 'morelinkstoimage', $this->mTitle->getPrefixedDBkey() );
        }
        
        function imageRedirects() 
@@ -583,7 +583,8 @@ EOT
                if ( 0 == $dbr->numRows( $res ) ) 
                        return;
 
-               $wgOut->addHTML( '<p>' . wfMsg( 'redirectstofile' ) .  "</p>\n<ul>" );
+               $wgOut->addWikiMsg( 'redirectstofile' );
+               $wgOut->addHTML( "<ul>\n" );
 
                $sk = $wgUser->getSkin();
                while ( $row = $dbr->fetchObject( $res ) ) {