From: Bryan Tong Minh Date: Thu, 12 Nov 2009 22:35:25 +0000 (+0000) Subject: * (bug 17662) Customizable default preload/editintro in add-new-section link for... X-Git-Tag: 1.31.0-rc.0~38833 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=293f574a1eab95ec7cb7f2450a76eae120aac778;p=lhc%2Fweb%2Fwiklou.git * (bug 17662) Customizable default preload/editintro in add-new-section link for Talk page. Patch by ireas. --- diff --git a/CREDITS b/CREDITS index ea5e420278..d8b4de94fb 100644 --- a/CREDITS +++ b/CREDITS @@ -74,6 +74,7 @@ following names for their contribution to the product. * Emufarmers * FunPika * Happy-melon +* Ireas * Jeremy Baron * Jidanni * Jimmy Xu diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 6bead24161..5852fa1583 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -278,6 +278,8 @@ Hopefully we will remove this configuration var soon) * rebuildtextindex.php maintenance script now supports databases other than MySQL * upgrade1_5.php now requires to be run --update option to prevent confusion +* (bug 17662) Customizable default preload/editintro in add-new-section link + for Talk page === Bug fixes in 1.16 === diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 50024c2c57..314073fbcb 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -740,10 +740,19 @@ class SkinTemplate extends Skin { // adds new section link if page is a current revision of a talk page or if ( ( $wgArticle && $wgArticle->isCurrent() && $istalk ) || $wgOut->showNewSectionLink() ) { if ( !$wgOut->forceHideNewSectionLink() ) { + $urlArgs = 'action=edit§ion=new'; + $preloadMsg = wfMsg( 'talk-addsection-preload' ); + $editintroMsg = wfMsg( 'talk-addsection-editintro' ); + if( '' != $preloadMsg ) { + $urlArgs .= '&preload=' . urlencode( $preloadMsg ); + } + if( '' != $editintroMsg ) { + $urlArgs .= '&editintro=' . urlencode( $editintroMsg ); + } $content_actions['addsection'] = array( 'class' => $section == 'new' ? 'selected' : false, 'text' => wfMsg( 'addsection' ), - 'href' => $this->mTitle->getLocalUrl( 'action=edit§ion=new' ) + 'href' => $this->mTitle->getLocalUrl( $urlArgs ) ); } } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index e754b21235..31cefb669b 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1357,6 +1357,8 @@ It appears to have been deleted.', 'edit-no-change' => 'Your edit was ignored, because no change was made to the text.', 'edit-already-exists' => 'Could not create a new page. It already exists.', +'talk-addsection-preload' => '', # should be empty +'talk-addsection-editintro' => '', # should be empty # Parser/template warnings 'expensive-parserfunction-warning' => "'''Warning:''' This page contains too many expensive parser function calls.