From 19ccb623921c895af51068f9a1e65835add34d02 Mon Sep 17 00:00:00 2001 From: Tim Laqua Date: Mon, 3 Sep 2007 17:46:34 +0000 Subject: [PATCH] Fixed bug 10836 Added 'newsectionsummary' message to allow customization and localization of prefix text in new section links in Recent Changes Updated RELEASE-NOTES --- RELEASE-NOTES | 8 ++++++-- includes/EditPage.php | 4 ++++ languages/messages/MessagesEn.php | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 84fdd2ced0..8cfa4a0486 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -194,8 +194,11 @@ 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 -* (bug 9426) Add 'newsectionheaderdefaultlevel' message to allow modification - of the heading formatting for new sections when section=new argument is supplied +* (bug 9426) Add 'newsectionheaderdefaultlevel' message to allow + modification of the heading formatting for new sections when section=new + argument is supplied +* (bug 10836) Add 'newsectionsummary' message to allow modification of the + text that prefixes a new section link in Recent Changes == Bugfixes since 1.10 == @@ -431,6 +434,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 11114) Fix regression in read-only mode error display during editing * Force non-MySQL databases to use an ORDER BY in SpecialAllpages to ensure that the first page_title is truly the first page title. +* (bug 10836) Change the summary on creating of new section == API changes since 1.10 == diff --git a/includes/EditPage.php b/includes/EditPage.php index a5afb44775..98c5d8b5b8 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -842,6 +842,10 @@ class EditPage { } if( $this->summary != '' ) { $sectionanchor = $this->sectionAnchor( $this->summary ); + # This is a new section, so create a link to the new section + # in the revision summary. + $this->summary = wfMsg('newsectionsummary') . + "[[{$this->mTitle->getPrefixedText()}#{$this->summary}|{$this->summary}]]"; } } elseif( $this->section != '' ) { # Try to get a section anchor from the section source, redirect to edited section if header found diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 3fef550e11..8c5e66062c 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1351,6 +1351,7 @@ Unselected groups will not be changed. You can deselect a group with CTRL + Left 'rc_categories' => 'Limit to categories (separate with "|")', 'rc_categories_any' => 'Any', 'rc-change-size' => '$1', # only translate this message to other languages if you have to change it +'newsectionsummary' => 'New section: ', # Recent changes linked 'recentchangeslinked' => 'Related changes', -- 2.20.1