Florianschmidtwelzow has uploaded a new change for review.
https://gerrit.wikimedia.org/r/206753
Change subject: Add edit link to each row on Special:WhatLinksHere
......................................................................
Add edit link to each row on Special:WhatLinksHere
Bug: T97269
Change-Id: Ic13b775bc0c0ede947086c7eb305ac5d4f2fcd12
---
M includes/specials/SpecialWhatlinkshere.php
1 file changed, 9 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/53/206753/1
diff --git a/includes/specials/SpecialWhatlinkshere.php
b/includes/specials/SpecialWhatlinkshere.php
index 0b3175a..5fc1a7a 100644
--- a/includes/specials/SpecialWhatlinkshere.php
+++ b/includes/specials/SpecialWhatlinkshere.php
@@ -313,7 +313,7 @@
static $msgcache = null;
if ( $msgcache === null ) {
static $msgs = array( 'isredirect', 'istemplate',
'semicolon-separator',
- 'whatlinkshere-links', 'isimage' );
+ 'whatlinkshere-links', 'isimage', 'edit' );
$msgcache = array();
foreach ( $msgs as $msg ) {
$msgcache[$msg] = $this->msg( $msg )->escaped();
@@ -354,7 +354,7 @@
}
# Space for utilities links, with a what-links-here link
provided
- $wlhLink = $this->wlhLink( $nt,
$msgcache['whatlinkshere-links'] );
+ $wlhLink = $this->wlhLink( $nt,
$msgcache['whatlinkshere-links'], $msgcache['edit'] );
$wlh = Xml::wrapClass(
$this->msg( 'parentheses' )->rawParams( $wlhLink
)->escaped(),
'mw-whatlinkshere-tools'
@@ -369,7 +369,7 @@
return Xml::closeElement( 'ul' );
}
- protected function wlhLink( Title $target, $text ) {
+ protected function wlhLink( Title $target, $text, $editText ) {
static $title = null;
if ( $title === null ) {
$title = $this->getPageTitle();
@@ -380,6 +380,12 @@
$text,
array(),
array( 'target' => $target->getPrefixedText() )
+ ) . ' | ' .
+ Linker::linkKnown(
+ $target,
+ $editText,
+ array(),
+ array( 'action' => 'edit' )
);
}
--
To view, visit https://gerrit.wikimedia.org/r/206753
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic13b775bc0c0ede947086c7eb305ac5d4f2fcd12
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits