* @todo Use some variant of Pager or something; the pagination here is lousy.
*/
+use MediaWiki\MediaWikiServices;
use Wikimedia\Rdbms\IDatabase;
/**
$fetchlinks = ( !$hidelinks || !$hideredirs );
// Build query conds in concert for all three tables...
+ $conds = [];
$conds['pagelinks'] = [
'pl_namespace' => $target->getNamespace(),
'pl_title' => $target->getDBkey(),
// 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;
// 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()
) {