Last modified: 2013-03-24 21:15:54 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T28904, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 26904 - WhatLinksHere only lists image link or transclusion, never both.
WhatLinksHere only lists image link or transclusion, never both.
Status: NEW
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.18.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
http://commons.wikimedia.org/w/index....
:
: 26903 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-24 16:25 UTC by Krinkle
Modified: 2013-03-24 21:15 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Krinkle 2011-01-24 16:25:25 UTC
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 overwritten.

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 let one count stronger than the other (in this case imagelink, over templatelink, over pagelink) however the following code is clearly designed with the scenario in mind that multiple props could be 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>
Comment 1 Krinkle 2011-01-24 16:25:42 UTC
*** Bug 26903 has been marked as a duplicate of this bug. ***
Comment 2 Andre Klapper 2013-03-24 19:30:18 UTC
Code is now at https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=includes/specials/SpecialWhatlinkshere.php;hb=HEAD#l313 (for an potential contributors); seems to be still valid.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links