* (bug 30711) WikiPage::replaceSection() now always the current text when adding...
[lhc/web/wiklou.git] / includes / QueryPage.php
index c3c96dc..ef675c0 100644 (file)
@@ -470,7 +470,7 @@ abstract class QueryPage extends SpecialPage {
                                $ts = $this->getCachedTimestamp();
 
                                if ( $ts ) {
-                                       $lang = $this->getLang();
+                                       $lang = $this->getLanguage();
                                        $updated = $lang->timeanddate( $ts, true, true );
                                        $updateddate = $lang->date( $ts, true, true );
                                        $updatedtime = $lang->time( $ts, true, true );
@@ -502,16 +502,16 @@ abstract class QueryPage extends SpecialPage {
                if ( $this->shownavigation ) {
                        $out->addHTML( $this->getPageHeader() );
                        if ( $this->numRows > 0 ) {
-                               $out->addHTML( '<p>' . wfShowingResults( $this->offset, $this->numRows ) . '</p>' );
+                               $out->addHTML( $this->msg( 'showingresults' )->numParams(
+                                       $this->numRows, $this->offset + 1 )->parseAsBlock() );
                                # Disable the "next" link when we reach the end
-                               $paging = wfViewPrevNext( $this->offset, $this->limit,
-                                       $this->getTitle( $par ),
-                                       wfArrayToCGI( $this->linkParameters() ), ( $this->numRows < $this->limit ) );
+                               $paging = $this->getLanguage()->viewPrevNext( $this->getTitle( $par ), $this->offset,
+                                       $this->limit, $this->linkParameters(), ( $this->numRows < $this->limit ) );
                                $out->addHTML( '<p>' . $paging . '</p>' );
                        } else {
                                # No results to show, so don't bother with "showing X of Y" etc.
                                # -- just let the user know and give up now
-                               $out->addHTML( '<p>' . wfMsgHtml( 'specialpage-empty' ) . '</p>' );
+                               $out->addWikiMsg( 'specialpage-empty' );
                                $out->addHTML( Xml::closeElement( 'div' ) );
                                return;
                        }
@@ -699,7 +699,7 @@ abstract class QueryPage extends SpecialPage {
        }
 
        function feedDesc() {
-               return wfMsgExt( 'tagline', 'parsemag' );
+               return $this->msg( 'tagline' )->text();
        }
 
        function feedUrl() {
@@ -760,8 +760,8 @@ abstract class WantedQueryPage extends QueryPage {
                if ( $title instanceof Title ) {
                        if ( $this->isCached() || $this->forceExistenceCheck() ) {
                                $pageLink = $title->isKnown()
-                                       ? '<del>' . $skin->link( $title ) . '</del>'
-                                       : $skin->link(
+                                       ? '<del>' . Linker::link( $title ) . '</del>'
+                                       : Linker::link(
                                                $title,
                                                null,
                                                array(),
@@ -769,7 +769,7 @@ abstract class WantedQueryPage extends QueryPage {
                                                array( 'broken' )
                                        );
                        } else {
-                               $pageLink = $skin->link(
+                               $pageLink = Linker::link(
                                        $title,
                                        null,
                                        array(),
@@ -777,10 +777,9 @@ abstract class WantedQueryPage extends QueryPage {
                                        array( 'broken' )
                                );
                        }
-                       return $this->getLang()->specialList( $pageLink, $this->makeWlhLink( $title, $skin, $result ) );
+                       return $this->getLanguage()->specialList( $pageLink, $this->makeWlhLink( $title, $result ) );
                } else {
-                       $tsafe = htmlspecialchars( $result->title );
-                       return wfMsgHtml( 'wantedpages-badtitle', $tsafe );
+                       return $this->msg( 'wantedpages-badtitle', $result->title )->escaped();
                }
        }
 
@@ -788,14 +787,12 @@ abstract class WantedQueryPage extends QueryPage {
         * Make a "what links here" link for a given title
         *
         * @param $title Title to make the link for
-        * @param $skin Skin object to use
         * @param $result Object: result row
         * @return string
         */
-       private function makeWlhLink( $title, $skin, $result ) {
-               $wlh = SpecialPage::getTitleFor( 'Whatlinkshere' );
-               $label = wfMsgExt( 'nlinks', array( 'parsemag', 'escape' ),
-               $this->getLang()->formatNum( $result->value ) );
-               return $skin->link( $wlh, $label, array(), array( 'target' => $title->getPrefixedText() ) );
+       private function makeWlhLink( $title, $result ) {
+               $wlh = SpecialPage::getTitleFor( 'Whatlinkshere', $title->getPrefixedText() );
+               $label = $this->msg( 'nlinks' )->numParams( $result->value )->escaped();
+               return Linker::link( $wlh, $label );
        }
 }