r11916 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r11915‎ | r11916 | r11917 >
Date:06:28, 3 December 2005
Author:vibber
Status:old
Tags:
Comment:
* (bug 1850) Allow red-links on image pages linked with [[:image:foo]]
* (bug 360) Let Whatlinkshere track [[:image:foo]] links
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Title.php (modified) (history)
  • /trunk/phase3/maintenance/parserTests.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/parserTests.txt
@@ -2546,8 +2546,26 @@
25472547 </p>
25482548 !! end
25492549
 2550+!! test
 2551+Image link to nonexistent file (bug 1850 - good)
 2552+!! input
 2553+[[Image:No such.jpg]]
 2554+!! result
 2555+<p><a href="https://www.mediawiki.org/index.php?title=Special:Upload&amp;wpDestFile=No_such.jpg" class="new" title="Image:No such.jpg">Image:No such.jpg</a>
 2556+</p>
 2557+!! end
25502558
 2559+!! test
 2560+:Image link to nonexistent file (bug 1850 - bad)
 2561+!! input
 2562+[[:Image:No such.jpg]]
 2563+!! result
 2564+<p><a href="https://www.mediawiki.org/index.php?title=Image:No_such.jpg&amp;action=edit" class="new" title="Image:No such.jpg">Image:No such.jpg</a>
 2565+</p>
 2566+!! end
25512567
 2568+
 2569+
25522570 !! test
25532571 Character reference normalization in link text (bug 1938)
25542572 !! input
Index: trunk/phase3/includes/Title.php
@@ -2012,14 +2012,12 @@
20132013 /**
20142014 * Should a link should be displayed as a known link, just based on its title?
20152015 *
2016 - * Currently, a self-link with a fragment, special pages and image pages are in
2017 - * this category. Special pages never exist in the database. Some images do not
2018 - * have description pages in the database, but the description page contains
2019 - * useful history information that the user may want to link to.
 2016+ * Currently, a self-link with a fragment and special pages are in
 2017+ * this category. Special pages never exist in the database.
20202018 */
20212019 function isAlwaysKnown() {
20222020 return $this->isExternal() || ( 0 == $this->mNamespace && "" == $this->mDbkeyform )
2023 - || NS_SPECIAL == $this->mNamespace || NS_IMAGE == $this->mNamespace;
 2021+ || NS_SPECIAL == $this->mNamespace;
20242022 }
20252023
20262024 /**
Index: trunk/phase3/RELEASE-NOTES
@@ -279,6 +279,8 @@
280280 Copyright warning now above the buttons to ensure it's visible,
281281 template list at the bottom so it can grow.
282282 * Tweak infinite-template-handling loop for PHP 5.1.1 string handling change
 283+* (bug 1850) Allow red-links on image pages linked with [[:image:foo]]
 284+* (bug 360) Let Whatlinkshere track [[:image:foo]] links
283285
284286
285287 === Caveats ===

Follow-up revisions

RevisionCommit summaryAuthorDate
r11976* (bug 1850) Additional fixes so existing local and remote images...vibber07:08, 5 December 2005
r12975Fix for parser test error "Image link to nonexistent file (bug 1850)", both "...magnus_manske17:50, 7 February 2006
r12976(bug 1850) Image link to nonexistent file fixed.magnus_manske17:53, 7 February 2006

Status & tagging log