* (bug 1850) Allow red-links on image pages linked with [[:image:foo]]
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 3 Dec 2005 06:28:56 +0000 (06:28 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 3 Dec 2005 06:28:56 +0000 (06:28 +0000)
* (bug 360) Let Whatlinkshere track [[:image:foo]] links

RELEASE-NOTES
includes/Title.php
maintenance/parserTests.txt

index f98fae0..c145538 100644 (file)
@@ -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 ===
index b2ec314..064c1f2 100644 (file)
@@ -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;
        }
 
        /**
index 31b8e51..123d47e 100644 (file)
@@ -2546,6 +2546,24 @@ Media link to nonexistent file (bug 1702)
 </p>
 !! end
 
+!! test
+Image link to nonexistent file (bug 1850 - good)
+!! input
+[[Image:No such.jpg]]
+!! result
+<p><a href="/index.php?title=Special:Upload&amp;wpDestFile=No_such.jpg" class="new" title="Image:No such.jpg">Image:No such.jpg</a>
+</p>
+!! end
+
+!! test
+:Image link to nonexistent file (bug 1850 - bad)
+!! input
+[[:Image:No such.jpg]]
+!! result
+<p><a href="/index.php?title=Image:No_such.jpg&amp;action=edit" class="new" title="Image:No such.jpg">Image:No such.jpg</a>
+</p>
+!! end
+
 
 
 !! test