Revert r34906, r34907, r34928 -- mixing high-level data into low-level storage functi...
[lhc/web/wiklou.git] / includes / SpecialDoubleRedirects.php
index 2a7d172..9bfa7e5 100644 (file)
@@ -6,7 +6,7 @@
 
 /**
  * A special page listing redirects to redirecting page.
- * The software will not procede double redirects automaticly to prevent loops.
+ * The software will automatically not follow double redirects, to prevent loops.
  * @addtogroup SpecialPage
  */
 class DoubleRedirectsPage extends PageQueryPage {
@@ -19,12 +19,11 @@ class DoubleRedirectsPage extends PageQueryPage {
        function isSyndicated() { return false; }
 
        function getPageHeader( ) {
-               #FIXME : probably need to add a backlink to the maintenance page.
-               return '<p>'.wfMsg("doubleredirectstext")."</p><br />\n";
+               return wfMsgExt( 'doubleredirectstext', array( 'parse' ) );
        }
 
        function getSQLText( &$dbr, $namespace = null, $title = null ) {
-               
+
                list( $page, $redirect ) = $dbr->tableNamesN( 'page', 'redirect' );
 
                $limitToTitle = !( $namespace === null && $title === null );
@@ -49,7 +48,7 @@ class DoubleRedirectsPage extends PageQueryPage {
 
                return $sql;
        }
-       
+
        function getSQL() {
                $dbr = wfGetDB( DB_SLAVE );
                return $this->getSQLText( $dbr );
@@ -61,7 +60,7 @@ class DoubleRedirectsPage extends PageQueryPage {
 
        function formatResult( $skin, $result ) {
                global $wgContLang;
-       
+
                $fname = 'DoubleRedirectsPage::formatResult';
                $titleA = Title::makeTitle( $result->namespace, $result->title );
 
@@ -75,13 +74,13 @@ class DoubleRedirectsPage extends PageQueryPage {
                        }
                }
                if ( !$result ) {
-                       return '';
+                       return '<s>' . $skin->makeLinkObj( $titleA, '', 'redirect=no' ) . '</s>';
                }
 
                $titleB = Title::makeTitle( $result->nsb, $result->tb );
                $titleC = Title::makeTitle( $result->nsc, $result->tc );
 
-               $linkA = $skin->makeKnownLinkObj( $titleA,'', 'redirect=no' );
+               $linkA = $skin->makeKnownLinkObj( $titleA, '', 'redirect=no' );
                $edit = $skin->makeBrokenLinkObj( $titleA, "(".wfMsg("qbedit").")" , 'redirect=no');
                $linkB = $skin->makeKnownLinkObj( $titleB, '', 'redirect=no' );
                $linkC = $skin->makeKnownLinkObj( $titleC );
@@ -102,4 +101,3 @@ function wfSpecialDoubleRedirects() {
        return $sdr->doQuery( $offset, $limit );
 
 }
-?>