// array_shift( $titles );
$redirValues = array();
+
+ /** @var $newTitle Title */
foreach ( $titles as $id => $newTitle ) {
if ( !isset( $titles[$id - 1] ) ) {
$name = $titleObj->getPrefixedDBkey();
$model = $contentHandler->getModelID();
- $this->dieUsage( "The requested format $contentFormat is not supported for content model ".
+ $this->dieUsage( "The requested format $contentFormat is not supported for content model " .
" $model used by $name", 'badformat' );
}
$articleContext->setWikiPage( $pageObj );
$articleContext->setUser( $this->getUser() );
+ /** @var $articleObject Article */
$articleObject = Article::newFromWikiPage( $pageObj, $articleContext );
$ep = new EditPage( $articleObject );
case EditPage::AS_SUCCESS_NEW_ARTICLE:
$r['new'] = '';
+ // fall-through
case EditPage::AS_SUCCESS_UPDATE:
$r['result'] = 'Success';
'section' => null,
'sectiontitle' => array(
ApiBase::PARAM_TYPE => 'string',
- ApiBase::PARAM_REQUIRED => false,
),
'text' => null,
'token' => array(
public function getExamples() {
return array(
-
'api.php?action=edit&title=Test&summary=test%20summary&text=article%20content&basetimestamp=20070824123454&token=%2B\\'
=> 'Edit a page (anonymous user)',
-
'api.php?action=edit&title=Test&summary=NOTOC&minor=&prependtext=__NOTOC__%0A&basetimestamp=20070824123454&token=%2B\\'
=> 'Prepend __NOTOC__ to a page (anonymous user)',
'api.php?action=edit&title=Test&undo=13585&undoafter=13579&basetimestamp=20070824123454&token=%2B\\'