The last checkin changed 'copyrightwarning' in a way that broke if the
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 18 Aug 2004 00:04:06 +0000 (00:04 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 18 Aug 2004 00:04:06 +0000 (00:04 +0000)
wiki wasn't configured to provide copyright metadata, and requires editing
or rebuilding the message if the configuration is changed.

Now uses the value in existence at runtime so it can be reconfigured more
easily, and adds a 'copyrightwarning2' message which changes the wording
a bit to be used when no copyright metadata is provided.

This change should be more upwards-compatible. Also, changed 'copyrightwarning'
to be wikitext instead of raw HTML; this shouldn't break any of the built-in
texts but might requires adjustment to customized versions.

includes/EditPage.php
languages/Language.php

index fc4503a..b694b56 100644 (file)
@@ -316,8 +316,12 @@ class EditPage {
                $edithelp = '<a target="helpwindow" href="'.$edithelpurl.'">'.
                        htmlspecialchars( wfMsg( 'edithelp' ) ).'</a> '.
                        htmlspecialchars( wfMsg( 'newwindow' ) );
-               $copywarn = wfMsg( "copyrightwarning", $sk->makeKnownLink(
-                 wfMsg( "copyrightpage" ) ) );
+
+               global $wgRightsText;
+               $copywarn = "<div id=\"editpage-copywarn\">\n" .
+                       wfMsg( $wgRightsText ? "copyrightwarning" : "copyrightwarning2",
+                               "[[" . wfMsg( "copyrightpage" ) . "]]",
+                               $wgRightsText ) . "\n</div>";
 
                if( $wgUser->getOption("showtoolbar") and !$isCssJsSubpage ) {
                        # prepare toolbar for edit buttons
@@ -424,8 +428,9 @@ htmlspecialchars( $wgLang->recodeForEdit( $this->textbox1 ) ) .
 " title=\"".wfMsg('tooltip-save')."\"/>
 <input tabindex='6' id='wpPreview' type='submit' value=\"{$prev}\" name=\"wpPreview\" accesskey=\"".wfMsg('accesskey-preview')."\"".
 " title=\"".wfMsg('tooltip-preview')."\"/>
-<em>{$cancel}</em> | <em>{$edithelp}</em>
-<br /><div id=\"editpage-copywarn\">{$copywarn}</div>
+<em>{$cancel}</em> | <em>{$edithelp}</em>" );
+               $wgOut->addWikiText( $copywarn );
+               $wgOut->addHTML( "
 <input type='hidden' value=\"" . htmlspecialchars( $this->section ) . "\" name=\"wpSection\" />
 <input type='hidden' value=\"{$this->edittime}\" name=\"wpEdittime\" />\n" );
 
index 4db34fc..d124074 100644 (file)
@@ -638,13 +638,18 @@ revision of this page.
 If you save it, any changes made since this revision will be lost.</strong>\n',
 'yourdiff'             => 'Differences',
 'copyrightwarning' => "Please note that all contributions to {{SITENAME}} are
-considered to be released under the $wgRightsText
-(see $1 for details).
+considered to be released under the $2 (see $1 for details).
 If you don't want your writing to be edited mercilessly and redistributed
 at will, then don't 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.
 <strong>DO NOT SUBMIT COPYRIGHTED WORK WITHOUT PERMISSION!</strong>",
+'copyrightwarning2' => "Please note that all contributions to {{SITENAME}}
+may be edited, altered, or removed by other contributors.
+If you don't want your writing to be edited mercilessly, then don't 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).
+<strong>DO NOT SUBMIT COPYRIGHTED WORK WITHOUT PERMISSION!</strong>",
 'longpagewarning' => "WARNING: This page is $1 kilobytes long; some
 browsers may have problems editing pages approaching or longer than 32kb.
 Please consider breaking the page into smaller sections.",