Added new mw message 'editpage-head-copy-warn' to EditPage header.
authorRob Moen <rmoen@wikimedia.org>
Tue, 28 Aug 2012 20:24:21 +0000 (13:24 -0700)
committerRob Moen <rmoen@wikimedia.org>
Tue, 28 Aug 2012 21:13:11 +0000 (14:13 -0700)
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

includes/EditPage.php
languages/messages/MessagesEn.php
maintenance/language/messageTypes.inc
maintenance/language/messages.inc

index d60d73c..0389168 100644 (file)
@@ -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( '<div id="wikiDiff">' . $difftext . '</div>' );
        }
 
+       /**
+        * Show the header copyright warning.
+        */
+       protected function showHeaderCopyrightWarning() {
+               $msg = 'editpage-head-copy-warn';
+               if ( !wfMessage( $msg )->isDisabled() ) {
+                       global $wgOut;
+                       $wgOut->wrapWikiMsg( "<div class='editpage-head-copywarn'>\n$1\n</div>",
+                               'editpage-head-copy-warn' );
+               }
+       }
+
        /**
         * Give a chance for site and per-namespace customizations of
         * terms of service summary link that might exist separately
index 0828bbe..910c0ae 100644 (file)
@@ -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.<br />
 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}}.'''
index 2d0f90f..1324bd7 100644 (file)
@@ -189,6 +189,7 @@ $wgIgnoredMessages = array(
        'wantedtemplates-summary',
        'activeusers-summary',
        'search-summary',
+       'editpage-head-copy-warn',
        'editpage-tos-summary',
        'addsection-preload',
        'addsection-editintro',
index 33c104b..71beec6 100644 (file)
@@ -653,6 +653,7 @@ $wgMessageStructure = array(
                'yourdiff',
                'copyrightwarning',
                'copyrightwarning2',
+               'editpage-head-copy-warn',
                'editpage-tos-summary',
                'longpage-hint',
                'longpageerror',