with the content.
* (bug 51342) prop=imageinfo iicontinue now contains the dbkey, not the text
version of the title.
+* (bug 52538) action=edit will now use empty text instead of the contents
+ of section 0 when passed prependtext or appendtext with section=new.
=== Languages updated in 1.22===
$this->dieUsage( "Sections are not supported for this content model: $modelName.", 'sectionsnotsupported' );
}
- // Process the content for section edits
- $section = intval( $params['section'] );
- $content = $content->getSection( $section );
+ if ( $params['section'] == 'new' ) {
+ // DWIM if they're trying to prepend/append to a new section.
+ $content = null;
+ } else {
+ // Process the content for section edits
+ $section = intval( $params['section'] );
+ $content = $content->getSection( $section );
- if ( !$content ) {
- $this->dieUsage( "There is no section {$section}.", 'nosuchsection' );
+ if ( !$content ) {
+ $this->dieUsage( "There is no section {$section}.", 'nosuchsection' );
+ }
}
}