From 93c67aa5926c4f9ff4198ebe1a705ee4d4322a25 Mon Sep 17 00:00:00 2001 From: Tim Laqua Date: Sun, 2 Sep 2007 00:36:06 +0000 Subject: [PATCH] Fixed bug 9456 - added editsummaryheading system message to allow changing the heading level for newly added sections (i.e. section=new) --- RELEASE-NOTES | 6 ++++-- includes/Article.php | 4 ++-- languages/messages/MessagesEn.php | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 606c58419e..533011a5e0 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -194,7 +194,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN 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) + == Bugfixes since 1.10 == * (bug 9712) Use Arabic comma in date/time formats for Arabic and Farsi @@ -427,7 +429,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 8393) and 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 == API changes since 1.10 == diff --git a/includes/Article.php b/includes/Article.php index 5bb5915eb3..e0112aa3e0 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1181,7 +1181,7 @@ class Article { if( $section == 'new' ) { # Inserting a new section - $subject = $summary ? "== {$summary} ==\n\n" : ''; + $subject = $summary ? wfMsgForContent('editsummaryheading',$summary) . "\n\n" : ''; $text = strlen( trim( $oldtext ) ) > 0 ? "{$oldtext}\n\n{$subject}{$text}" : "{$subject}{$text}"; @@ -1207,7 +1207,7 @@ class Article { # If this is a comment, add the summary as headline if ( $comment && $summary != "" ) { - $text = "== {$summary} ==\n\n".$text; + $text = wfMsgForContent('editsummaryheading',$summary) . "\n\n" . $text; } $this->doEdit( $text, $summary, $flags ); diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index fc1ad88521..6a70a4155e 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -709,6 +709,7 @@ XHTML id names. '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 # Short words for each namespace, by default used in the 'article' tab in monobook 'nstab-main' => 'Article', -- 2.20.1