使用者:Antigng/includes/Specials/SpecialEdit.php
<?php
class SpecialEdit extends RedirectSpecialPage {
function __construct() {
parent::__construct( 'Edit' );
$this->mAllowedRedirectParams = array();
}
function getRedirect( $subpage ) {
if ( $subpage !== '' ) {
$this->mAddedRedirectParams['action']='edit';
$this->mAddedRedirectParams['title'] = $subpage;
}
else {
$this->addHelpLink( 'Help:Edit' );
throw new ErrorPageError( 'nopagetitle', 'nopagetext' );
}
return true;
}
}