X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialBrokenRedirects.php;h=3e1909b836d083b9daf259bb226be1eac6583da1;hb=2324d1af57aebfc5a5ddcbbd01b4d974d989fd5f;hp=cd9345d1bf74991bad59dcd5ed91303c6f5910dc;hpb=a6fe5967b3f4d797c24a0800b15adbc211b7056d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialBrokenRedirects.php b/includes/specials/SpecialBrokenRedirects.php index cd9345d1bf..3e1909b836 100644 --- a/includes/specials/SpecialBrokenRedirects.php +++ b/includes/specials/SpecialBrokenRedirects.php @@ -21,7 +21,7 @@ * @ingroup SpecialPage */ -use Wikimedia\Rdbms\ResultWrapper; +use Wikimedia\Rdbms\IResultWrapper; use Wikimedia\Rdbms\IDatabase; /** @@ -66,6 +66,7 @@ class BrokenRedirectsPage extends QueryPage { 'value' => 'p1.page_title', 'rd_namespace', 'rd_title', + 'rd_fragment', ], 'conds' => [ // Exclude pages that don't exist locally as wiki pages, @@ -102,7 +103,7 @@ class BrokenRedirectsPage extends QueryPage { function formatResult( $skin, $result ) { $fromObj = Title::makeTitle( $result->namespace, $result->title ); if ( isset( $result->rd_title ) ) { - $toObj = Title::makeTitle( $result->rd_namespace, $result->rd_title ); + $toObj = Title::makeTitle( $result->rd_namespace, $result->rd_title, $result->rd_fragment ); } else { $blinks = $fromObj->getBrokenLinksFrom(); # TODO: check for redirect, not for links if ( $blinks ) { @@ -139,7 +140,7 @@ class BrokenRedirectsPage extends QueryPage { [ 'action' => 'edit' ] ); } - $to = $linkRenderer->makeBrokenLink( $toObj ); + $to = $linkRenderer->makeBrokenLink( $toObj, $toObj->getFullText() ); $arr = $this->getLanguage()->getArrow(); $out = $from . $this->msg( 'word-separator' )->escaped(); @@ -166,7 +167,7 @@ class BrokenRedirectsPage extends QueryPage { * Cache page content model for performance * * @param IDatabase $db - * @param ResultWrapper $res + * @param IResultWrapper $res */ function preprocessResults( $db, $res ) { $this->executeLBFromResultWrapper( $res );