* (bug 24016) API: Handle parameters specified in simple string syntax
( 'paramname' => 'defaultval' ) correctly when outputting help
* (bug 24089) Logevents causes PHP Notice if leprop=title isn't supplied
-* (bug 23473) - Give description of properties on all modules
+* (bug 23473) Give description of properties on all modules
+* (bug 24136) unknownerror when adding new section without summary, but forceditsummary
=== Languages updated in 1.17 ===
'userrights-nodatabase' => array( 'code' => 'nosuchdatabase', 'info' => "Database ``\$1'' does not exist or is not local" ),
'nouserspecified' => array( 'code' => 'invaliduser', 'info' => "Invalid username ``\$1''" ),
'noname' => array( 'code' => 'invaliduser', 'info' => "Invalid username ``\$1''" ),
+ 'summaryrequired' => array( 'code' => 'summaryrequired', 'info' => 'Summary required'),
// API-specific messages
'readrequired' => array( 'code' => 'readapidenied', 'info' => "You need read permission to use this module" ),
$undoafterRev = Revision::newFromID( $params['undoafter'] );
}
$undoRev = Revision::newFromID( $params['undo'] );
- if ( is_null( $undoRev ) || $undoRev->isDeleted( Revision::DELETED_TEXT ) )
- {
+ if ( is_null( $undoRev ) || $undoRev->isDeleted( Revision::DELETED_TEXT ) ) {
$this->dieUsageMsg( array( 'nosuchrevid', $params['undo'] ) );
}
if ( $params['undoafter'] == 0 ) {
$undoafterRev = $undoRev->getPrevious();
}
- if ( is_null( $undoafterRev ) || $undoafterRev->isDeleted( Revision::DELETED_TEXT ) )
- {
+ if ( is_null( $undoafterRev ) || $undoafterRev->isDeleted( Revision::DELETED_TEXT ) ) {
$this->dieUsageMsg( array( 'nosuchrevid', $params['undoafter'] ) );
}
$params['text'] = $newtext;
// If no summary was given and we only undid one rev,
// use an autosummary
- if ( is_null( $params['summary'] ) && $titleObj->getNextRevisionID( $undoafterRev->getID() ) == $params['undo'] )
- {
+ if ( is_null( $params['summary'] ) && $titleObj->getNextRevisionID( $undoafterRev->getID() ) == $params['undo'] ) {
$params['summary'] = wfMsgForContent( 'undo-summary', $params['undo'], $undoRev->getUserText() );
}
}
// Watch out for basetimestamp == ''
// wfTimestamp() treats it as NOW, almost certainly causing an edit conflict
- if ( !is_null( $params['basetimestamp'] ) && $params['basetimestamp'] != '' )
- {
+ if ( !is_null( $params['basetimestamp'] ) && $params['basetimestamp'] != '' ) {
$reqArr['wpEdittime'] = wfTimestamp( TS_MW, $params['basetimestamp'] );
} else {
$reqArr['wpEdittime'] = $articleObj->getTimestamp();
if ( !is_null( $params['section'] ) ) {
$section = intval( $params['section'] );
- if ( $section == 0 && $params['section'] != '0' && $params['section'] != 'new' )
- {
+ if ( $section == 0 && $params['section'] != '0' && $params['section'] != 'new' ) {
$this->dieUsage( "The section parameter must be set to an integer or 'new'", "invalidsection" );
}
$reqArr['wpSection'] = $params['section'];
}
$r = array();
- if ( !wfRunHooks( 'APIEditBeforeSave', array( $ep, $ep->textbox1, &$r ) ) )
- {
+ if ( !wfRunHooks( 'APIEditBeforeSave', array( $ep, $ep->textbox1, &$r ) ) ) {
if ( count( $r ) ) {
$r['result'] = 'Failure';
$this->getResult()->addValue( null, $this->getModuleName(), $r );
$newArticle->getTimestamp() );
}
break;
+
+ case EditPage::AS_SUMMARY_NEEDED:
+ $this->dieUsageMsg( array( 'summaryrequired' ) );
case EditPage::AS_END:
// This usually means some kind of race condition