r76384 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76383‎ | r76384 | r76385 >
Date:12:00, 9 November 2010
Author:ialex
Status:ok (Comments)
Tags:
Comment:
* (bug 25843) Links to special pages using link= attribute on images are now normalised like normal links to special pages
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Linker.php
@@ -553,7 +553,7 @@
554554 if ( isset( $frameParams['link-url'] ) && $frameParams['link-url'] !== '' ) {
555555 $mtoParams['custom-url-link'] = $frameParams['link-url'];
556556 } elseif ( isset( $frameParams['link-title'] ) && $frameParams['link-title'] !== '' ) {
557 - $mtoParams['custom-title-link'] = $frameParams['link-title'];
 557+ $mtoParams['custom-title-link'] = $this->normaliseSpecialPage( $frameParams['link-title'] );
558558 } elseif ( !empty( $frameParams['no-link'] ) ) {
559559 // No link
560560 } else {
Index: trunk/phase3/RELEASE-NOTES
@@ -408,6 +408,8 @@
409409 * (bug 25175) HTML file cache now honor $wgCacheDirectory if
410410 $wgFileCacheDirectory is not set
411411 * (bug 13353) Diff3 version checks were too strict, did not detect working diff3
 412+* (bug 25843) Links to special pages using link= attribute on images are now
 413+ normalised like normal links to special pages
412414
413415 === API changes in 1.17 ===
414416 * (bug 22738) Allow filtering by action type on query=logevent.

Comments

#Comment by Happy-melon (talk | contribs)   23:54, 14 December 2010

Would it be safer to test $frameParams['link-title'] instanceof Title instead of against '' before calling on it?

#Comment by MarkAHershberger (talk | contribs)   15:57, 25 January 2011

it seems to me like it would be safer, but I think this is adequate.

Status & tagging log