From: Tim Starling Date: Tue, 26 Feb 2008 06:10:24 +0000 (+0000) Subject: Use a separate redlink parameter for red link determination, instead of overloading... X-Git-Tag: 1.31.0-rc.0~49340 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=dd0614d29dd98fcfb6593a2365ed1faf80244a9e;p=lhc%2Fweb%2Fwiklou.git Use a separate redlink parameter for red link determination, instead of overloading the action parameter --- diff --git a/includes/EditPage.php b/includes/EditPage.php index 2bb9e72b8a..1a3eae72e3 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -394,10 +394,6 @@ class EditPage { wfProfileOut( __METHOD__ ); return; } else { - if( $wgRequest->getVal( 'action' ) == 'editredlink' ) { - $wgOut->redirect( $this->mTitle->getFullUrl( 'action=edit' ) ); - return; - } if ( $this->save ) { $this->formtype = 'save'; } else if ( $this->preview ) { @@ -485,11 +481,11 @@ class EditPage { /** * Show a read-only error * Parameters are the same as OutputPage:readOnlyPage() - * Redirect to the article page if action=editredlink + * Redirect to the article page if redlink=1 */ function readOnlyPage( $source = null, $protected = false, $reasons = array() ) { global $wgRequest, $wgOut; - if ( $wgRequest->getVal( 'action' ) === 'editredlink' ) { + if ( $wgRequest->getBool( 'redlink' ) ) { // The edit page was reached via a red link. // Redirect to the article page and let them click the edit tab if // they really want a permission error. diff --git a/includes/Linker.php b/includes/Linker.php index 4f27d6523a..f1ae634126 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -344,9 +344,9 @@ class Linker { if( $nt->getNamespace() == NS_SPECIAL ) { $q = $query; } else if ( '' == $query ) { - $q = 'action=editredlink'; + $q = 'action=edit&redlink=1'; } else { - $q = 'action=editredlink&'.$query; + $q = 'action=edit&redlink=1&'.$query; } $u = $nt->escapeLocalURL( $q );