r56261 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56260‎ | r56261 | r56262 >
Date:13:09, 13 September 2009
Author:siebrand
Status:resolved (Comments)
Tags:
Comment:
* add module 'WikimediaLicenseTexts'. Disabled by default. This module is added to be used, after review and configuration at the WMF cluster, at Wikimedia Commons to properly structure localised license templates. If this proves to be a succes, we could imagine other Wikimedia wikis to ask for these messages to be activated also.
* allow localisation through Translate extension
Modified paths:
  • /trunk/extensions/Translate/groups/mediawiki-defines.txt (modified) (history)
  • /trunk/extensions/WikimediaMessages/WikimediaLicenseTexts.i18n.php (added) (history)
  • /trunk/extensions/WikimediaMessages/WikimediaMessages.php (modified) (history)

Diff [purge]

Index: trunk/extensions/WikimediaMessages/WikimediaMessages.php
@@ -5,10 +5,17 @@
66 *
77 * @addtogroup Extensions
88 *
9 - * @copyright Copyright © 2008, Tim Starling
 9+ * @copyright Copyright © 2008-2009, Tim Starling
 10+ * @copyright Copyright © 2009, Siebrand Mazeland, Multichill
1011 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
1112 */
1213
 14+// Settings
 15+if( !isset( $wgWikimediaLicenseTexts ) ) {
 16+ // Set to true in LocalSettings.php to load Wikimedia license texts
 17+ $wgWikimediaLicenseTexts = false;
 18+}
 19+
1320 $wgExtensionCredits['other'][] = array(
1421 'path' => __FILE__,
1522 'name' => 'WikimediaMessages',
@@ -22,6 +29,19 @@
2330 $wgExtensionMessagesFiles['WikimediaMessages'] = $dir .'WikimediaMessages.i18n.php';
2431 $wgExtensionFunctions[] = 'wfSetupWikimediaMessages';
2532
 33+if( $wgWikimediaLicenseTexts ) {
 34+ $wgExtensionCredits['other'][] = array(
 35+ 'path' => __FILE__,
 36+ 'name' => 'WikimediaLicenseTexts',
 37+ 'url' => 'http://www.mediawiki.org/wiki/Extension:WikimediaMessages',
 38+ 'author' => array( 'Multichill', 'Siebrand Mazeland' ),
 39+ 'description' => 'Wikimedia license texts',
 40+ 'descriptionmsg' => 'wikimedialicensetexts-desc',
 41+ );
 42+
 43+ $wgExtensionMessagesFiles['WikimediaLicenseTexts'] = $dir . '/WikimediaLicenseTexts.i18n.php';
 44+}
 45+
2646 include_once ( $dir .'WikimediaGrammarForms.php' );
2747
2848 function wfSetupWikimediaMessages() {
Index: trunk/extensions/WikimediaMessages/WikimediaLicenseTexts.i18n.php
@@ -0,0 +1,32 @@
 2+<?php
 3+/**
 4+ * Internationalisation file for extension Wikimedia Messages - message group Wikimedia License Texts
 5+ *
 6+ * @addtogroup Extensions
 7+ */
 8+
 9+$messages = array();
 10+
 11+$messages['en'] = array(
 12+ 'wikimedialicensetexts-desc' => 'Wikimedia license messages',
 13+ 'wm-license-cc-wiki-link' => 'w:en:Creative Commons',
 14+ 'wm-license-cc-attribution' => 'Attribution',
 15+ 'wm-license-cc-by-1.0-text' => 'This file is licensed under [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [http://creativecommons.org/licenses/by/1.0/deed.en Attribution 1.0 Generic] license',
 16+ 'wm-license-cc-by-2.0-text' => 'This file is licensed under [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [http://creativecommons.org/licenses/by/2.0/deed.en Attribution 2.0 Generic] license',
 17+ 'wm-license-cc-by-2.5-text' => 'This file is licensed under [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [http://creativecommons.org/licenses/by/2.5/deed.en Attribution 2.5 Generic] license',
 18+ 'wm-license-cc-by-3.0-text' => 'This file is licensed under [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [http://creativecommons.org/licenses/by/3.0/deed.en Attribution 3.0 Unported] license',
 19+ 'wm-license-cc-by-sa-1.0-text' => 'This file is licensed under [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [http://creativecommons.org/licenses/by-sa/1.0/deed.en Attribution-Share Alike 1.0 Generic] license',
 20+ 'wm-license-cc-by-sa-2.0-text' => 'This file is licensed under [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [http://creativecommons.org/licenses/by-sa/2.0/deed.en Attribution-Share Alike 2.0 Generic] license',
 21+ 'wm-license-cc-by-sa-2.5-text' => 'This file is licensed under [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [http://creativecommons.org/licenses/by-sa/2.5/deed.en Attribution-Share Alike 2.5 Generic] license',
 22+ 'wm-license-cc-by-sa-3.0-text' => 'This file is licensed under [[{{int:wm-license-cc-wiki-link}}|Creative Commons]] [http://creativecommons.org/licenses/by-sa/3.0/deed.en Attribution-Share Alike 3.0 Unported] license',
 23+ 'wm-license-cc-free' => 'You are free',
 24+ 'wm-license-cc-free-to-share-header' => 'to share',
 25+ 'wm-license-cc-free-to-share-text' => 'to copy, distribute and transmit the work',
 26+ 'wm-license-cc-free-to-remix-header' => 'to remix',
 27+ 'wm-license-cc-free-to-remix-text' => 'to adapt the work',
 28+ 'wm-license-cc-conditions' => 'Under the following conditions',
 29+ 'wm-license-cc-conditions-attribution-header' => 'attribution ',
 30+ 'wm-license-cc-conditions-attribution-text' => 'You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).',
 31+ 'wm-license-cc-conditions-share_alike-header' => 'share alike',
 32+ 'wm-license-cc-conditions-share_alike-text' => 'If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.',
 33+);
Property changes on: trunk/extensions/WikimediaMessages/WikimediaLicenseTexts.i18n.php
___________________________________________________________________
Name: svn:eol-style
134 + native
Name: svn:keywords
235 + Id
Index: trunk/extensions/Translate/groups/mediawiki-defines.txt
@@ -1258,6 +1258,10 @@
12591259 optional = grouppage-Staff, shared-repo-name-shared
12601260 prefix = wmf- | sidebar, grouppage-Staff, group-Staff, group-Staff-member
12611261
 1262+Wikimedia License Texts
 1263+file = WikimediaMessages/WikimediaLicenseTexts.i18n.php
 1264+descmsg = wikimedialicensetexts-desc
 1265+
12621266 Wiki Text Logged In Out
12631267
12641268 Woopra

Follow-up revisions

RevisionCommit summaryAuthorDate
r59716Fix register_globals vulnerability in r56261. WikimediaLicenseTexts is now a ...siebrand00:16, 4 December 2009

Comments

#Comment by Tim Starling (talk | contribs)   05:46, 1 December 2009

register_globals vulnerability.

Status & tagging log