* @todo Use some variant of Pager or something; the pagination here is lousy.
*/
+use Wikimedia\Rdbms\IDatabase;
+
/**
* Implements Special:Whatlinkshere
*
$linkRenderer = $this->getLinkRenderer();
+ if ( $text !== null ) {
+ $text = new HtmlArmor( $text );
+ }
+
// always show a "<- Links" link
$links = [
'links' => $linkRenderer->makeKnownLink(
$title,
- new HtmlArmor( $text ),
+ $text,
[],
[ 'target' => $target->getPrefixedText() ]
),
// check, if the content model is editable through action=edit
ContentHandler::getForTitle( $target )->supportsDirectEditing()
) {
+ if ( $editText !== null ) {
+ $editText = new HtmlArmor( $editText );
+ }
+
$links['edit'] = $linkRenderer->makeKnownLink(
$target,
- new HtmlArmor( $editText ),
+ $editText,
[],
[ 'action' => 'edit' ]
);
}
function makeSelfLink( $text, $query ) {
+ if ( $text !== null ) {
+ $text = new HtmlArmor( $text );
+ }
+
return $this->getLinkRenderer()->makeKnownLink(
$this->selfTitle,
- new HtmlArmor( $text ),
+ $text,
[],
$query
);