From: Brion Vibber
Date: Sat, 3 Dec 2005 06:28:56 +0000 (+0000)
Subject: * (bug 1850) Allow red-links on image pages linked with [[:image:foo]]
X-Git-Tag: 1.6.0~1063
X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=ca0d82d580e3893400d8fc263378ff1bb7e21299;p=lhc%2Fweb%2Fwiklou.git
* (bug 1850) Allow red-links on image pages linked with [[:image:foo]]
* (bug 360) Let Whatlinkshere track [[:image:foo]] links
---
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index f98fae0f23..c145538ae6 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -279,6 +279,8 @@ fully support the editing toolbar, but was found to be too confusing.
Copyright warning now above the buttons to ensure it's visible,
template list at the bottom so it can grow.
* Tweak infinite-template-handling loop for PHP 5.1.1 string handling change
+* (bug 1850) Allow red-links on image pages linked with [[:image:foo]]
+* (bug 360) Let Whatlinkshere track [[:image:foo]] links
=== Caveats ===
diff --git a/includes/Title.php b/includes/Title.php
index b2ec314e2d..064c1f2875 100644
--- a/includes/Title.php
+++ b/includes/Title.php
@@ -2012,14 +2012,12 @@ class Title {
/**
* Should a link should be displayed as a known link, just based on its title?
*
- * Currently, a self-link with a fragment, special pages and image pages are in
- * this category. Special pages never exist in the database. Some images do not
- * have description pages in the database, but the description page contains
- * useful history information that the user may want to link to.
+ * Currently, a self-link with a fragment and special pages are in
+ * this category. Special pages never exist in the database.
*/
function isAlwaysKnown() {
return $this->isExternal() || ( 0 == $this->mNamespace && "" == $this->mDbkeyform )
- || NS_SPECIAL == $this->mNamespace || NS_IMAGE == $this->mNamespace;
+ || NS_SPECIAL == $this->mNamespace;
}
/**
diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt
index 31b8e51a33..123d47eddc 100644
--- a/maintenance/parserTests.txt
+++ b/maintenance/parserTests.txt
@@ -2546,6 +2546,24 @@ Media link to nonexistent file (bug 1702)
!! end
+!! test
+Image link to nonexistent file (bug 1850 - good)
+!! input
+[[Image:No such.jpg]]
+!! result
+Image:No such.jpg
+
+!! end
+
+!! test
+:Image link to nonexistent file (bug 1850 - bad)
+!! input
+[[:Image:No such.jpg]]
+!! result
+Image:No such.jpg
+
+!! end
+
!! test