mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-14 19:35:38 +00:00
Merge "Ignore transcluded items when finding permalinks"
This commit is contained in:
commit
4c2442eeb6
|
@ -84,7 +84,6 @@ class ApiDiscussionToolsFindComment extends ApiBase {
|
|||
if ( $redirects === 1 && $value['couldredirect'] ) {
|
||||
$value['shouldredirect'] = true;
|
||||
}
|
||||
unset( $value['couldredirect'] );
|
||||
$this->getResult()->addValue( $this->getModuleName(), null, $value );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -619,8 +619,9 @@ function init( $container, state ) {
|
|||
var titles = [];
|
||||
if ( result.discussiontoolsfindcomment ) {
|
||||
titles = result.discussiontoolsfindcomment.map( function ( threadItemData ) {
|
||||
// oldid=null means the item appears on the current revision of the page
|
||||
if ( !threadItemData.oldid ) {
|
||||
// Only show items that appear on the current revision of their page
|
||||
// and are not transcluded from another page
|
||||
if ( threadItemData.couldredirect ) {
|
||||
var title = mw.Title.newFromText(
|
||||
threadItemData.title + '#' +
|
||||
mw.util.escapeIdForLink( threadItemData.id )
|
||||
|
|
Loading…
Reference in a new issue