Page MenuHomePhabricator

WhatLinksHere only lists image link or transclusion, never both.
Closed, ResolvedPublic

Description

The three foreach() loops here:
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/specials/SpecialWhatlinkshere.php?revision=80409&view=markup#l188

overwrite eachother. That was done to avoid duplicates. However the props are also rewritten.

Perhaps a check to see if it's been set already should be done and merge the is_template/is_image props.

Although we could choose to simply decide to let one count strong than the other (in this case imagelink, over templatelink, over pagelink) however the following part of the code is clearly designed with the scenario in mind that multiple props are set to 1:

http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/specials/SpecialWhatlinkshere.php?revision=80409&view=markup#l292
<pre>
298 if ( $row->is_template )
299 $props[] = $msgcache['istemplate'];
300 if( $row->is_image )
301 $props[] = $msgcache['isimage'];
302
303 if ( count( $props ) ) {
304 $propsText = '(' . implode( $msgcache['semicolon-separator'], $props ) . ')';
305 }
</pre>


Version: 1.18.x
Severity: enhancement
URL: http://commons.wikimedia.org/w/index.php?title=Special%3AWhatLinksHere&target=File%3AExample.svg&namespace=2

Details

Reference
bz26903

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:21 PM
bzimport set Reference to bz26903.
bzimport added a subscriber: Unknown Object (MLST).
  • This bug has been marked as a duplicate of bug 26904 ***