跳转到内容

用户: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;
	}
}