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 ) {
/**
* 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.
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 );