X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSpecialListredirects.php;h=92bd66e428ae220d6dff76426e6134ef6680ecd2;hb=c07e337da68a87e7e877c65194778f4b098bf7c2;hp=a7ae44f574e19995cd122f0a78962d817509de38;hpb=ad475d34654f01047ddf26b593c4377024e67118;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/SpecialListredirects.php b/includes/SpecialListredirects.php index a7ae44f574..92bd66e428 100644 --- a/includes/SpecialListredirects.php +++ b/includes/SpecialListredirects.php @@ -1,7 +1,6 @@ * @copyright © 2006 Rob Church @@ -9,10 +8,9 @@ */ /** - * @package MediaWiki - * @subpackage SpecialPage + * Special:Listredirects - Lists all the redirects on the wiki. + * @addtogroup SpecialPage */ - class ListredirectsPage extends QueryPage { function getName() { return( 'Listredirects' ); } @@ -21,7 +19,7 @@ class ListredirectsPage extends QueryPage { function sortDescending() { return( false ); } function getSQL() { - $dbr =& wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_SLAVE ); $page = $dbr->tableName( 'page' ); $sql = "SELECT 'Listredirects' AS type, page_title AS title, page_namespace AS namespace, 0 AS value FROM $page WHERE page_is_redirect = 1"; return( $sql ); @@ -32,7 +30,7 @@ class ListredirectsPage extends QueryPage { # Make a link to the redirect itself $rd_title = Title::makeTitle( $result->namespace, $result->title ); - $rd_link = $skin->makeKnownLinkObj( $rd_title, '', 'redirect=no' ); + $rd_link = $skin->makeLinkObj( $rd_title, '', 'redirect=no' ); # Find out where the redirect leads $revision = Revision::newFromTitle( $rd_title ); @@ -40,23 +38,15 @@ class ListredirectsPage extends QueryPage { # Make a link to the destination page $target = Title::newFromRedirect( $revision->getText() ); if( $target ) { + $arr = $wgContLang->getArrow() . $wgContLang->getDirMark(); $targetLink = $skin->makeLinkObj( $target ); + return "$rd_link $arr $targetLink"; } else { - /** @todo Put in some decent error display here */ - $targetLink = '*'; + return "$rd_link"; } } else { - /** @todo Put in some decent error display here */ - $targetLink = '*'; + return "$rd_link"; } - - # Check the language; RTL wikis need a ← - $arr = $wgContLang->isRTL() ? ' ← ' : ' → '; - $arr .= $wgContLang->getDirMark(); - - # Format the whole thing and return it - return( $rd_link . $arr . $targetLink ); - } } @@ -67,4 +57,4 @@ function wfSpecialListredirects() { $lrp->doQuery( $offset, $limit ); } -?> +