r69907 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69906‎ | r69907 | r69908 >
Date:20:55, 25 July 2010
Author:reedy
Status:reverted (Comments)
Tags:
Comment:
Pass $this->getName() to getLocalUrl
Modified paths:
  • /trunk/phase3/includes/filerepo/LocalFile.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/LocalFile.php
@@ -1125,7 +1125,7 @@
11261126 * Get the URL of the file description page.
11271127 */
11281128 function getDescriptionUrl() {
1129 - return $this->title->getLocalUrl();
 1129+ return $this->title->getLocalUrl( $this->getName() );
11301130 }
11311131
11321132 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r70264Revert r69907reedy08:49, 1 August 2010
r70296Repair getDescriptionUrl() and getDescriptionText() Follow up to r69907 and r......hartman22:07, 1 August 2010
r83114Revert r69907, r69908, r70264, r70296: introduces bug 27477....btongminh21:06, 2 March 2011

Comments

#Comment by TheDJ (talk | contribs)   00:55, 1 August 2010

This breaks descriptionUrl. The first argument for getLocalUrl is the query, not the title. api.php now produces http://localhost/wiki/index.php?title=File:Yahoo!Answers.png&Yahoo!Answers.png which is obviously wrong.

#Comment by Reedy (talk | contribs)   08:49, 1 August 2010

Hmm. Reverted, What you're saying does seem right.

I think this might be a bug elsewhere (not MediaWiki), will have a look

#Comment by Reedy (talk | contribs)   09:15, 1 August 2010

Gotcha. Seems its a bug in the IDE. Presumably with the lack of typed variables, and the way stuff is assigned, it just picked a method with the same name, but a different signature. In this case, WikiMap->getLocalUrl().

Will report upstream

Status & tagging log