From f0aa57de1c406b2790fde5b89c57cb34f24fda10 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 18 Aug 2004 00:04:06 +0000 Subject: [PATCH] The last checkin changed 'copyrightwarning' in a way that broke if the 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 | 13 +++++++++---- languages/Language.php | 9 +++++++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index fc4503a7f5..b694b565fe 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -316,8 +316,12 @@ class EditPage { $edithelp = ''. htmlspecialchars( wfMsg( 'edithelp' ) ).' '. htmlspecialchars( wfMsg( 'newwindow' ) ); - $copywarn = wfMsg( "copyrightwarning", $sk->makeKnownLink( - wfMsg( "copyrightpage" ) ) ); + + global $wgRightsText; + $copywarn = "
\n" . + wfMsg( $wgRightsText ? "copyrightwarning" : "copyrightwarning2", + "[[" . wfMsg( "copyrightpage" ) . "]]", + $wgRightsText ) . "\n
"; if( $wgUser->getOption("showtoolbar") and !$isCssJsSubpage ) { # prepare toolbar for edit buttons @@ -424,8 +428,9 @@ htmlspecialchars( $wgLang->recodeForEdit( $this->textbox1 ) ) . " title=\"".wfMsg('tooltip-save')."\"/> -{$cancel} | {$edithelp} -
{$copywarn}
+{$cancel} | {$edithelp}" ); + $wgOut->addWikiText( $copywarn ); + $wgOut->addHTML( " section ) . "\" name=\"wpSection\" /> edittime}\" name=\"wpEdittime\" />\n" ); diff --git a/languages/Language.php b/languages/Language.php index 4db34fc37e..d124074528 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -638,13 +638,18 @@ revision of this page. If you save it, any changes made since this revision will be lost.\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.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. DO NOT SUBMIT COPYRIGHTED WORK WITHOUT PERMISSION!", +'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.
+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!", '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.", -- 2.20.1