*/
class ApiUndelete extends ApiBase {
- public function __construct( $main, $action ) {
- parent::__construct( $main, $action );
- }
-
public function execute() {
$params = $this->extractRequestParams();
}
$titleObj = Title::newFromText( $params['title'] );
- if ( !$titleObj ) {
+ if ( !$titleObj || $titleObj->isExternal() ) {
$this->dieUsageMsg( array( 'invalidtitle', $params['title'] ) );
}
public function getHelpUrls() {
return 'https://www.mediawiki.org/wiki/API:Undelete';
}
-
- public function getVersion() {
- return __CLASS__ . ': $Id$';
- }
}