X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcheckBadRedirects.php;h=fec92910e4bd1783eda367ba669f21bf1a9f15ff;hb=5a77286a1e32f4fd784b5c2985f149fe39b45073;hp=670b93de2bb04492ba93fcc86984fa75e88e972b;hpb=a1607bf74e0364b1667f08797d487cb39d2166a9;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/checkBadRedirects.php b/maintenance/checkBadRedirects.php index 670b93de2b..fec92910e4 100644 --- a/maintenance/checkBadRedirects.php +++ b/maintenance/checkBadRedirects.php @@ -21,7 +21,7 @@ * @ingroup Maintenance */ -require_once( __DIR__ . '/Maintenance.php' ); +require_once __DIR__ . '/Maintenance.php'; /** * Maintenance script to check that pages marked as being redirects really are. @@ -44,13 +44,13 @@ class CheckBadRedirects extends Maintenance { $count = $result->numRows(); $this->output( "Found $count redirects.\n" . - "Checking for bad redirects:\n\n" ); + "Checking for bad redirects:\n\n" ); foreach ( $result as $row ) { $title = Title::makeTitle( $row->page_namespace, $row->page_title ); $rev = Revision::newFromId( $row->page_latest ); if ( $rev ) { - $target = Title::newFromRedirect( $rev->getText() ); + $target = $rev->getContent()->getRedirectTarget(); if ( !$target ) { $this->output( $title->getPrefixedText() . "\n" ); } @@ -61,4 +61,4 @@ class CheckBadRedirects extends Maintenance { } $maintClass = "CheckBadRedirects"; -require_once( RUN_MAINTENANCE_IF_MAIN ); +require_once RUN_MAINTENANCE_IF_MAIN;