X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialWhatLinksHere.php;h=5fe3605a9375d4706bc9098e161d14dc3a6cc0f6;hb=7b4eafda0d986180d20f37f2489b70e8eca00df4;hp=18c10bf706c2b20fb0dc6b5b0d5180b5d005e3b6;hpb=27a6845c2a675990b04dfead674c0d46d140aa17;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialWhatLinksHere.php b/includes/specials/SpecialWhatLinksHere.php index 18c10bf706..5fe3605a93 100644 --- a/includes/specials/SpecialWhatLinksHere.php +++ b/includes/specials/SpecialWhatLinksHere.php @@ -21,6 +21,7 @@ * @todo Use some variant of Pager or something; the pagination here is lousy. */ +use MediaWiki\MediaWikiServices; use Wikimedia\Rdbms\IDatabase; /** @@ -117,6 +118,7 @@ class SpecialWhatLinksHere extends IncludableSpecialPage { $fetchlinks = ( !$hidelinks || !$hideredirs ); // Build query conds in concert for all three tables... + $conds = []; $conds['pagelinks'] = [ 'pl_namespace' => $target->getNamespace(), 'pl_title' => $target->getDBkey(), @@ -229,6 +231,7 @@ class SpecialWhatLinksHere extends IncludableSpecialPage { // Read the rows into an array and remove duplicates // templatelinks comes second so that the templatelinks row overwrites the // pagelinks row, so we get (inclusion) rather than nothing + $rows = []; if ( $fetchlinks ) { foreach ( $plRes as $row ) { $row->is_template = 0; @@ -414,7 +417,9 @@ class SpecialWhatLinksHere extends IncludableSpecialPage { // if the page is editable, add an edit link if ( // check user permissions - $this->getUser()->isAllowed( 'edit' ) && + MediaWikiServices::getInstance() + ->getPermissionManager() + ->userHasRight( $this->getUser(), 'edit' ) && // check, if the content model is editable through action=edit ContentHandler::getForTitle( $target )->supportsDirectEditing() ) {