From: Rob Moen Date: Tue, 28 Aug 2012 20:24:21 +0000 (-0700) Subject: Added new mw message 'editpage-head-copy-warn' to EditPage header. X-Git-Tag: 1.31.0-rc.0~22556^2 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=4a5163d876874ee2ba4a8e7fb04ff8d14024e093;p=lhc%2Fweb%2Fwiklou.git Added new mw message 'editpage-head-copy-warn' to EditPage header. New copyright warning is to be just above the edit box. This message is intended to be optional and locally customized. Similar to editpage-tos-summary. See Micro Improvements for more information. http://www.mediawiki.org/wiki/Micro_Design_Improvements Change-Id: Ifbd842ebef8775630d97491a3c735e046df5d0df --- diff --git a/includes/EditPage.php b/includes/EditPage.php index d60d73ca56..038916861e 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -2102,8 +2102,11 @@ class EditPage { ); } } + # Add header copyright warning + $this->showHeaderCopyrightWarning(); } + /** * Standard summary input and label (wgSummary), abstracted so EditPage * subclasses may reorganize the form. @@ -2399,6 +2402,18 @@ HTML $wgOut->addHTML( '
' . $difftext . '
' ); } + /** + * Show the header copyright warning. + */ + protected function showHeaderCopyrightWarning() { + $msg = 'editpage-head-copy-warn'; + if ( !wfMessage( $msg )->isDisabled() ) { + global $wgOut; + $wgOut->wrapWikiMsg( "
\n$1\n
", + 'editpage-head-copy-warn' ); + } + } + /** * Give a chance for site and per-namespace customizations of * terms of service summary link that might exist separately diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 0828bbec0d..910c0aea69 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1435,6 +1435,7 @@ You are also promising us that you wrote this yourself, or copied it from a publ If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see $1 for details). '''Do not submit copyrighted work without permission!'''", +'editpage-head-copy-warn' => '-', # do not translate or duplicate this message to other languages 'editpage-tos-summary' => '-', # do not translate or duplicate this message to other languages 'longpage-hint' => '-', # do not translate or duplicate this message to other languages 'longpageerror' => "'''Error: The text you have submitted is {{PLURAL:$1|one kilobyte|$1 kilobytes}} long, which is longer than the maximum of {{PLURAL:$2|one kilobyte|$2 kilobytes}}.''' diff --git a/maintenance/language/messageTypes.inc b/maintenance/language/messageTypes.inc index 2d0f90f1ff..1324bd7338 100644 --- a/maintenance/language/messageTypes.inc +++ b/maintenance/language/messageTypes.inc @@ -189,6 +189,7 @@ $wgIgnoredMessages = array( 'wantedtemplates-summary', 'activeusers-summary', 'search-summary', + 'editpage-head-copy-warn', 'editpage-tos-summary', 'addsection-preload', 'addsection-editintro', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 33c104b1fb..71beec625f 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -653,6 +653,7 @@ $wgMessageStructure = array( 'yourdiff', 'copyrightwarning', 'copyrightwarning2', + 'editpage-head-copy-warn', 'editpage-tos-summary', 'longpage-hint', 'longpageerror',