Don't follow redirects pointing to Special:Userlogout
authorJens Frank <jeluf@users.mediawiki.org>
Mon, 16 Aug 2004 04:42:48 +0000 (04:42 +0000)
committerJens Frank <jeluf@users.mediawiki.org>
Mon, 16 Aug 2004 04:42:48 +0000 (04:42 +0000)
includes/Article.php

index 877982f..a00e5aa 100644 (file)
@@ -367,7 +367,7 @@ class Article {
                        # not to by either the function parameter or the query
                        if ( ( 'no' != $redirect ) && ( false == $noredir ) ) {
                                $rt = Title::newFromRedirect( $s->cur_text );
-                               if ( $rt ) {
+                               if ( $rt && ! ( $rt->getNamespace() == NS_SPECIAL && $rt->getText() == 'Userlogout' ) ) {
                                        # Gotta hand redirects to special pages differently:
                                        # Fill the HTTP response "Location" header and ignore
                                        # the rest of the page we're on.