So actually Article::followRedirect is used instead of Article::getRedirectTarget...
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Thu, 8 May 2008 21:25:12 +0000 (21:25 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Thu, 8 May 2008 21:25:12 +0000 (21:25 +0000)
includes/ImagePage.php

index 5013adb..887f2dc 100644 (file)
@@ -112,6 +112,13 @@ class ImagePage extends Article {
                $from = $this->img->getRedirected();
                return $this->mRedirectTarget = Title::makeTitle( NS_IMAGE, $from );
        }
+       public function followRedirect() {
+               if ( $this->img->isLocal() )
+                       return parent::followRedirect();
+                       
+               $from = $this->img->getRedirected();
+               return Title::makeTitle( NS_IMAGE, $from );             
+       }
 
        /**
         * Create the TOC