From eebe7e3ef58635e18d08bc6ee9b2c53d57370112 Mon Sep 17 00:00:00 2001
From: Antoine Musso
{$sl}\n" ); } - +# TODO & FIXME +# DoubleRedirects and BrokenRedirects are now using the QueryPage class. +# Might want to automaticly redirect users to the new pages instead +# of dieing. function wfSpecialDoubleRedirects() { - global $wgUser, $wgOut, $wgLang, $wgTitle; - $fname = 'wfSpecialDoubleRedirects'; - - list( $limit, $offset ) = wfCheckLimits(); - $dbr =& wfGetDB( DB_SLAVE ); - extract( $dbr->tableNames( 'cur', 'links' ) ); - - $sql = "SELECT ca.cur_namespace as ns_a, ca.cur_title as title_a," . - " cb.cur_namespace as ns_b, cb.cur_title as title_b," . - " cb.cur_text AS rt " . - "FROM $links,$cur AS ca,$cur AS cb ". - "WHERE ca.cur_is_redirect=1 AND cb.cur_is_redirect=1 AND l_to=cb.cur_id " . - " AND l_from=ca.cur_id LIMIT {$offset}, {$limit}" ; - - $res = $dbr->query( $sql, $fname ); - - $top = getMaintenancePageBacklink( 'doubleredirects' ); - $top .= '
'.wfMsg("doubleredirectstext")."
{$top}\n" );
-
- $sl = wfViewPrevNext( $offset, $limit, 'REPLACETHIS' ) ;
- $sl = str_replace ( 'REPLACETHIS' , sns().':Maintenance&subfunction=doubleredirects' , $sl ) ;
- $wgOut->addHTML( "
{$sl}\n" );
-
- $sk = $wgUser->getSkin();
- $s = '
{$sl}\n" ); + wfDebugDieBacktrace( 'SpecialMaintenance.php:wfSpecialDoubleRedirects() is obsolete use SpecialDoubleRedirects.php'); } - function wfSpecialBrokenRedirects() { - global $wgUser, $wgOut, $wgLang, $wgTitle; - $fname = 'wfSpecialBrokenRedirects'; - - list( $limit, $offset ) = wfCheckLimits(); - $dbr =& wfGetDB( DB_SLAVE ); - extract( $dbr->tableNames( 'cur', 'brokenlinks' ) ); - - - $sql = "SELECT bl_to,cur_title FROM $brokenlinks,$cur " . - "WHERE cur_is_redirect=1 AND cur_namespace=0 AND bl_from=cur_id " . - "LIMIT {$offset}, {$limit}" ; - - $res = $dbr->query( $sql, $fname ); - - $top = getMaintenancePageBacklink( 'brokenredirects' ); - $top .= '
'.wfMsg('brokenredirectstext')."
{$top}\n" );
-
- $sl = wfViewPrevNext( $offset, $limit, 'REPLACETHIS' ) ;
- $sl = str_replace ( 'REPLACETHIS' , sns().":Maintenance&subfunction=brokenredirects" , $sl ) ;
- $wgOut->addHTML( "
{$sl}\n" );
-
- $sk = $wgUser->getSkin();
- $s = '
{$sl}\n" ); + wfDebugDieBacktrace( 'SpecialMaintenance.php:wfSpecialBrokenRedirects() is obsolete use SpecialBrokenRedirects.php'); } diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index c13c578a21b..4737db64841 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -13,6 +13,9 @@ global $wgSpecialPages; /* private */ $wgSpecialPages = array( + 'DoubleRedirects' => new UnlistedSpecialPage ( 'DoubleRedirects' ), + 'BrokenRedirects' => new UnlistedSpecialPage ( 'BrokenRedirects' ), + "Userlogin" => new SpecialPage( "Userlogin" ), "Userlogout" => new UnlistedSpecialPage( "Userlogout" ), "Preferences" => new SpecialPage( "Preferences" ), -- 2.11.4.GIT