'Delete a page.'
);
}
+
+ public function getPossibleErrors() {
+ return array_merge( parent::getPossibleErrors(), array(
+ array( 'missingparam', 'token' ),
+ array( 'invalidtitle', 'title' ),
+ array( 'nosuchpageid', 'pageid' ),
+ array( 'notanarticle' ),
+ array( 'hookaborted', 'error' ),
+ ) );
+ }
protected function getExamples() {
return array (
public function getVersion() {
return __CLASS__ . ': $Id$';
}
-}
+}
\ No newline at end of file
protected function getDescription() {
return 'Create and edit pages.';
}
+
+ public function getPossibleErrors() {
+ return array_merge( parent::getPossibleErrors(), array(
+ array( 'missingparam', 'title' ),
+ array( 'missingtext' ),
+ array( 'missingparam', 'token' ),
+ array( 'sessionfailure' ),
+ array( 'invalidtitle', 'title' ),
+ array( 'createonly-exists' ),
+ array( 'nocreate-missing' ),
+ array( 'nosuchrevid', 'undo' ),
+ array( 'nosuchrevid', 'undoafter' ),
+ array( 'revwrongpage', 'id', 'text' ),
+ array( 'revwrongpage', 'id', 'text' ),
+ array( 'undo-failure' ),
+ array( 'hashcheckfailed' ),
+ array( 'hookaborted' ),
+ array( 'hookaborted' ),
+ array( 'noimageredirect-anon' ),
+ array( 'noimageredirect-logged' ),
+ array( 'spamdetected', 'spam' ),
+ array( 'filtered' ),
+ array( 'blockedtext' ),
+ array( 'contenttoobig', $this->getMaxArticleSize() ),
+ array( 'noedit-anon' ),
+ array( 'noedit' ),
+ array( 'actionthrottledtext' ),
+ array( 'wasdeleted' ),
+ array( 'nocreate-loggedin' ),
+ array( 'blankpage' ),
+ array( 'editconflict' ),
+ array( 'emptynewsection' ),
+ array( 'unknownerror', 'retval' ),
+ ) );
+ }
+
+ private function getMaxArticleSize() {
+ global $wgMaxArticleSize;
+ return $wgMaxArticleSize;
+ }
protected function getAllowedParams() {
return array (
$feedFormat = isset( $params['feedformat'] ) ? $params['feedformat'] : 'rss';
$feed = new $wgFeedClasses[$feedFormat] ( $feedTitle, htmlspecialchars( wfMsgForContent( 'watchlist' ) ), $feedUrl );
-
if ( $e instanceof UsageException ) {
$errorCode = $e->getCodeString();
} else {
'Import a page from another wiki, or an XML file'
);
}
+
+ public function getPossibleErrors() {
+ return array_merge( parent::getPossibleErrors(), array(
+ array( 'cantimport' ),
+ array( 'missingparam', 'token' ),
+ array( 'sessionfailure' ),
+ array( 'missingparam', 'interwikipage' ),
+ array( 'cantimport-upload' ),
+ array( 'import-unknownerror', 'source' ),
+ array( 'import-unknownerror', 'result' ),
+ ) );
+ }
protected function getExamples() {
return array(
{
return $this->mResultArr;
}
-}
+}
\ No newline at end of file
'Move a page.'
);
}
+
+ public function getPossibleErrors() {
+ return array_merge( parent::getPossibleErrors(), array(
+ array( 'missingparam', 'to' ),
+ array( 'missingparam', 'token' ),
+ array( 'sessionfailure' ),
+ array( 'invalidtitle', 'from' ),
+ array( 'nosuchpageid', 'fromid' ),
+ array( 'notanarticle' ),
+ array( 'invalidtitle', 'to' ),
+ array( 'sharedfile-exists' ),
+ ) );
+ }
protected function getExamples() {
return array (
'Patrol a page or revision. '
);
}
+
+ public function getPossibleErrors() {
+ return array_merge( parent::getPossibleErrors(), array(
+ array( 'missingparam', 'token' ),
+ array( 'missingparam', 'rcid' ),
+ array( 'sessionfailure' ),
+ array( 'nosuchrcid', 'rcid' ),
+ ) );
+ }
protected function getExamples() {
return array(
public function getVersion() {
return __CLASS__ . ': $Id$';
}
-}
+}
\ No newline at end of file
'Change the protection level of a page.'
);
}
+
+ public function getPossibleErrors() {
+ return array_merge( parent::getPossibleErrors(), array(
+ array( 'missingparam', 'title' ),
+ array( 'missingparam', 'token' ),
+ array( 'missingparam', 'protections' ),
+ array( 'sessionfailure' ),
+ array( 'invalidtitle', 'title' ),
+ array( 'toofewexpiries', 'noofexpiries', 'noofprotections' ) ),
+ array( 'create-titleexists' ),
+ array( 'missingtitle-createonly' ),
+ array( 'protect-invalidaction', 'action'] ),
+ array( 'protect-invalidlevel', 'level' ),
+ array( 'invalidexpiry', 'expiry' ),
+ array( 'pastexpiry', 'expiry' ),
+ ) );
+ }
protected function getExamples() {
return array (
ApiBase :: dieDebug( __METHOD__, 'Unknown module name' );
}
}
+
+ public function getPossibleErrors() {
+ return array_merge( parent::getPossibleErrors(), array(
+ array( 'invalidtitle', 'title' ),
+ array( 'missingparam', 'title' ),
+ ) );
+ }
protected function getExamples() {
static $examples = array (
public function keyPartToTitle( $keyPart ) {
return substr( $this->keyToTitle( $keyPart . 'x' ), 0, - 1 );
}
+
+ public function getPossibleErrors() {
+ return array_merge( parent::getPossibleErrors(), array(
+ array( 'invalidtitle', 'title' ),
+ array( 'invalidtitle', 'key' ),
+ ) );
+ }
/**
* Get version string for use in the API help output
'All parameters marked as (enum) may only be used with a single page (#2).'
);
}
+
+ public function getPossibleErrors() {
+ return array_merge( parent::getPossibleErrors(), array(
+ array( 'nosuchrevid', 'diffto' ),
+ ) );
+ }
protected function getExamples() {
return array (
'they will all be rolled back.'
);
}
+
+ public function getPossibleErrors() {
+ return array_merge( parent::getPossibleErrors(), array(
+ array( 'missingparam', 'title' ),
+ array( 'missingparam', 'user' ),
+ array( 'missingparam', 'token' ),
+ array( 'invalidtitle', 'title' ),
+ array( 'notanarticle' ),
+ array( 'invaliduser', 'user' ),
+ ) );
+ }
protected function getExamples() {
return array (
'retrieved through list=deletedrevs'
);
}
+
+ public function getPossibleErrors() {
+ return array_merge( parent::getPossibleErrors(), array(
+ array( 'missingparam', 'title' ),
+ array( 'missingparam', 'token' ),
+ array( 'permdenied-undelete' ),
+ array( 'blockedtext' ),
+ array( 'sessionfailure' ),
+ array( 'invalidtitle', 'title' ),
+ array( 'cannotundelete' ),
+ ) );
+ }
protected function getExamples() {
return array (
'Add or remove a page from/to the current user\'s watchlist'
);
}
+
+ public function getPossibleErrors() {
+ return array_merge( parent::getPossibleErrors(), array(
+ array( 'code' => 'notloggedin', 'info' => 'You must be logged-in to have a watchlist' ),
+ array( 'invalidtitle', 'title' ),
+ array( 'hookaborted' ),
+ ) );
+ }
protected function getExamples() {
return array(