text for a non-existent page
* (bug 11022) Use a more accurate page title for Special:Whatlinkshere and
Special:Recentchangeslinked
-* Add 'editsummaryheading' message to allow modification of the heading
- formatting for new sections (when section=new argument is supplied)
+* Add 'newsectionheaderdefaultlevel' message to allow modification of the
+ heading formatting for new sections when section=new argument is supplied
== Bugfixes since 1.10 ==
* (bug 8393) <sup> and <sub> need to be preserved (without attributes) for
entries in the table of contents
* (bug 11114) Fix regression in read-only mode error display during editing
-* (bug 9426) Some way to specify heading level for new sections
+* (bug 10836) Change the summary on creating of new section
== API changes since 1.10 ==
/**
* @return string Complete article text, or null if error
*/
- function replaceSection($section, $text, $summary = '', $edittime = NULL) {
+ function replaceSection($section, $text, &$summary = '', $edittime = NULL) {
wfProfileIn( __METHOD__ );
if( $section == '' ) {
if( $section == 'new' ) {
# Inserting a new section
- $subject = $summary ? wfMsgForContent('editsummaryheading',$summary) . "\n\n" : '';
+ $subject = $summary ? wfMsgForContent('newsectionheaderdefaultlevel',$summary) . "\n\n" : '';
+ # Heading has been added to text, now wrap comment for RC linking to heading
+ $summary = "/* {$summary} */";
$text = strlen( trim( $oldtext ) ) > 0
? "{$oldtext}\n\n{$subject}{$text}"
: "{$subject}{$text}";
/**
* @deprecated use Article::doEdit()
*/
- function insertNewArticle( $text, $summary, $isminor, $watchthis, $suppressRC=false, $comment=false ) {
+ function insertNewArticle( $text, &$summary, $isminor, $watchthis, $suppressRC=false, $comment=false ) {
$flags = EDIT_NEW | EDIT_DEFER_UPDATES | EDIT_AUTOSUMMARY |
( $isminor ? EDIT_MINOR : 0 ) |
( $suppressRC ? EDIT_SUPPRESS_RC : 0 );
# If this is a comment, add the summary as headline
if ( $comment && $summary != "" ) {
- $text = wfMsgForContent('editsummaryheading',$summary) . "\n\n" . $text;
+ $text = wfMsgForContent('newsectionheaderdefaultlevel',$summary) . "\n\n".$text;
+ # Heading has been added to text, now wrap comment for RC linking to heading
+ $summary = "/* {$summary} */";
}
$this->doEdit( $text, $summary, $flags );
'feed-rss' => 'RSS', # only translate this message to other languages if you have to change it
'sitenotice' => '-', # the equivalent to wgSiteNotice; don't translate or duplicate this message to other languages
'anonnotice' => '-', # don't translate or duplicate this message to other languages
-'editsummaryheading' => '== $1 ==', # don't translate or duplicate this message to other languages
+'newsectionheaderdefaultlevel' => '== $1 ==', # don't translate or duplicate this message to other languages
# Short words for each namespace, by default used in the 'article' tab in monobook
'nstab-main' => 'Article',