From 6860f0814d162ff7b2cb16ffc101986061f8ed71 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Thu, 5 Mar 2009 01:57:18 +0000 Subject: [PATCH] When redlink=1 is specified, and the page exists, redirect to the "view" page. --- includes/EditPage.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/EditPage.php b/includes/EditPage.php index 5f2ce38e42..2a64bb1d68 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -403,6 +403,11 @@ class EditPage { } } } + + // If they used redlink=1 and the page exists, redirect to the main article + if ( $wgRequest->getBool( 'redlink' ) && $this->mTitle->exists() ) { + $wgOut->redirect( $this->mTitle->getFullURL() ); + } wfProfileIn( __METHOD__."-business-end" ); -- 2.20.1