r14492 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r14491‎ | r14492 | r14493 >
Date:07:29, 31 May 2006
Author:erik
Status:old
Tags:
Comment:
fix magic => section links (from edit summaries) to sections that have links of the type [[:Image:Foo.jpg]] in their title
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Linker.php
@@ -895,7 +895,12 @@
896896 if( $title ) {
897897 $section = $auto;
898898
899 - # This is hackish but should work in most cases.
 899+ # Generate a valid anchor name from the section title.
 900+ # Hackish, but should generally work - we strip wiki
 901+ # syntax, including the magic [[: that is used to
 902+ # "link rather than show" in case of images and
 903+ # interlanguage links.
 904+ $section = str_replace( '[[:', '', $section );
900905 $section = str_replace( '[[', '', $section );
901906 $section = str_replace( ']]', '', $section );
902907 $sectionTitle = wfClone( $title );
Index: trunk/phase3/RELEASE-NOTES
@@ -387,6 +387,7 @@
388388 * (bug 6125) Add links to edit old versions to diff views
389389 * (bug 5127) Auto edit summary when creating redirect page
390390 * (bug 3926) Introduce {{#language:}} magic word
 391+* Fix section links from edit comments for [[:Image:Bla.jpg]] in section titles
391392
392393 == Compatibility ==
393394

Status & tagging log