* (bug 14199) Fix deletion form for image redirect pages
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 20 May 2008 22:09:30 +0000 (22:09 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 20 May 2008 22:09:30 +0000 (22:09 +0000)
Image deletion was popping up the special image deletion form for the target image, which isn't friendly for redirects. :)
Now checking for redirect state as well as non-localness and non-existence, and pop up the regular page delete form for this.

RELEASE-NOTES
includes/ImagePage.php

index f464649..e91c4ad 100644 (file)
@@ -286,6 +286,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   even if the wiki's overall content language is not Korean
 * (bug 12773) addOnloadHook() now calls functions immediately when scripts are
   loaded after the primary page completion, instead of dropping them
+* (bug 14199) Fix deletion form for image redirect pages
 
 
 === API changes in 1.13 ===
index 3b63ac2..181905c 100644 (file)
@@ -711,7 +711,7 @@ EOT
         */
        public function delete() {
                $this->loadFile();
-               if( !$this->img->exists() || !$this->img->isLocal() ) {
+               if( !$this->img->exists() || !$this->img->isLocal() || $this->img->getRedirected() ) {
                        // Standard article deletion
                        Article::delete();
                        return;