Strike the link to the redirect rather than using an asterisk in Special:Listredirects
authorRotem Liss <rotem@users.mediawiki.org>
Sun, 16 Sep 2007 03:38:37 +0000 (03:38 +0000)
committerRotem Liss <rotem@users.mediawiki.org>
Sun, 16 Sep 2007 03:38:37 +0000 (03:38 +0000)
RELEASE-NOTES
includes/SpecialListredirects.php

index 37c5d78..f2f4978 100644 (file)
@@ -56,6 +56,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Fix initial statistics when installing: add correct values
 * (bug 11342) Fix several 'returnto' links in permissions/error pages which
   linked to the main page instead of targetted page
+* Strike the link to the redirect rather than using an asterisk in Special:Listredirects
 
 
 === API changes in 1.12 ===
index 581ea55..92bd66e 100644 (file)
@@ -30,8 +30,7 @@ class ListredirectsPage extends QueryPage {
        
                # Make a link to the redirect itself
                $rd_title = Title::makeTitle( $result->namespace, $result->title );
-               $arr = $wgContLang->getArrow() . $wgContLang->getDirMark();
-               $rd_link = $skin->makeKnownLinkObj( $rd_title, '', 'redirect=no' );
+               $rd_link = $skin->makeLinkObj( $rd_title, '', 'redirect=no' );
 
                # Find out where the redirect leads
                $revision = Revision::newFromTitle( $rd_title );
@@ -39,19 +38,15 @@ class ListredirectsPage extends QueryPage {
                        # Make a link to the destination page
                        $target = Title::newFromRedirect( $revision->getText() );
                        if( $target ) {
+                               $arr = $wgContLang->getArrow() . $wgContLang->getDirMark();
                                $targetLink = $skin->makeLinkObj( $target );
+                               return "$rd_link $arr $targetLink";
                        } else {
-                               /** @todo Put in some decent error display here */
-                               $targetLink = '*';
+                               return "<s>$rd_link</s>";
                        }
                } else {
-                       /** @todo Put in some decent error display here */
-                       $targetLink = '*';
+                       return "<s>$rd_link</s>";
                }
-
-               # Format the whole thing and return it
-               return "$rd_link $arr $targetLink";
-
        }
 
 }