Last modified: 2014-10-21 16:31:33 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T62023, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 60023 - Wikimedia wikis are displaying the incorrect license information
Wikimedia wikis are displaying the incorrect license information
Status: NEW
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
wmf-deployment
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 40459
  Show dependency treegraph
 
Reported: 2014-01-14 00:02 UTC by Sam Reed (reedy)
Modified: 2014-10-21 16:31 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Sam Reed (reedy) 2014-01-14 00:02:46 UTC
Nothing seems to use $wmgUseDualLicense, and all wikis are displaying the licensing of just CC BY SA...

   'wikidata-copyright' => 'All structured data from the main and property namespace is available under the <a href="https://creativecommons.org/publicdomain/zero/1.0/" title="Definition of the Creative Commons CC0 License">Creative Commons CC0 License</a>;
text in the other namespaces is available under the <a href="https://creativecommons.org/licenses/by-sa/3.0/" title="Definition of the Creative Commons Attribution/Share-Alike License">Creative Commons Attribution/Share-Alike License</a>;
additional terms may apply.
See <a href="https://wikimediafoundation.org/wiki/Terms_of_Use" title="Wikimedia Foundation Terms of Use">Terms of Use</a> for details.',
   'wikimedia-copyrightwarning' => 'By clicking the "{{int:savearticle}}" button, you agree to the [https://wikimediafoundation.org/wiki/Terms_of_Use Terms of Use], and you irrevocably agree to release your contribution under the [https://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License CC BY-SA 3.0 License] and the [https://en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License GFDL].
You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.',
Comment 1 Sam Reed (reedy) 2014-01-14 00:37:31 UTC
   'wikimedia-copyright' => 'Text is available under the <a href="https://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution/Share-Alike License</a>;
additional terms may apply.
See <a href="https://wikimediafoundation.org/wiki/Terms_of_Use">Terms of Use</a> for details.',
Comment 2 Sam Reed (reedy) 2014-01-14 02:04:46 UTC
(In reply to comment #0)
> Nothing seems to use $wmgUseDualLicense, and all wikis are displaying the
> licensing of just CC BY SA...

The only thing in InitialiseSettings.php that changes is the following:

'wgRightsUrl' => array(
	'default' => '//creativecommons.org/licenses/by-sa/3.0/',
	'huwikinews' => '//creativecommons.org/licenses/by/3.0/',
	'wikinews' => '//creativecommons.org/licenses/by/2.5/',
),
'wgRightsText' => array(
	'default' => 'Creative Commons Attribution-Share Alike 3.0',
	'huwikinews' => 'Creative Commons Attribution 3.0',
	'wikinews' => 'Creative Commons Attribution 2.5',
),
'wgRightsIcon' => array(
	'default' => '//creativecommons.org/images/public/somerights20.png',
),

Then in CommonSettings.php

// bug 44617
if ( in_array( $wgDBname, array( 'wikidatawiki', 'testwikidatawiki' ) ) ) {
	$wgHooks['SkinCopyrightFooter'][] = function( $title, $type, &$msg, &$link, &$forContent ) {
		if ( $title->getNamespace() === NS_MAIN ) {
			$msg = 'Creative Commons Public Domain 1.0';
			$link = '//creativecommons.org/publicdomain/zero/1.0/';
		}
		return true;
	};
}


The only place any of these are modified further is in the WikimediaMessages extension. The code is/was a little hard to follow in it's current format. I've made it a bit simpler to read by putting things where they are used in https://gerrit.wikimedia.org/r/107281 and a bit more simplification in https://gerrit.wikimedia.org/r/107284

The code currently is now as such, it modifies the Skin Copyright Footer for all wikis bar huwikinews and any of the other wikinews projects (see $wgRightsUrl above)

	if( strpos( $wgRightsUrl, 'creativecommons.org/licenses/by-sa/3.0' ) !== false ) {
		// Override with Wikimedia's site-specific copyright message defaults
		// with the CC/GFDL semi-dual license fun!

		/**
		 * @param $title Title
		 * @param $type string
		 * @param $msg string
		 * @param $link
		 * @param $forContent bool
		 * @return bool
		 */
		$wgHooks['SkinCopyrightFooter'][] = function( $title, $type, &$msg, &$link, &$forContent ) {
			if( $type != 'history' ) {
				global $wgDBname;
				if ( in_array( $wgDBname, array( 'wikidatawiki', 'testwikidatawiki' ) ) ) {
					$msg = 'wikidata-copyright';
				} else {
					$msg = 'wikimedia-copyright'; // the default;
				}
				$forContent = false;
			}

			return true;
		};

		$wgHooks['EditPageCopyrightWarning'][] = function( $title, &$msg ) {
			$msg = array( 'wikimedia-copyrightwarning' );
			return true;
		};
	}

wikimedia-copyright doesn't mention GFDL, but 'wikimedia-copyrightwarning' does. Neither of which respect $wmgUseDualLicense

The Wikidata messages are fine, though, should probably be collapsed down to one set of config on the SkinCopyrightFooter hook.

For the variance, the current 'wikimedia-copyright' and 'wikimedia-copyrightwarning' need normalising, and then a dual variant adding (or a singular depending on how current ones are changed)


Config then updated to be something like

	if( strpos( $wgRightsUrl, 'creativecommons.org/licenses/by-sa/3.0' ) !== false ) {
		// Override with Wikimedia's site-specific copyright message defaults
		// with the CC/GFDL semi-dual license fun!

		/**
		 * @param $title Title
		 * @param $type string
		 * @param $msg string
		 * @param $link
		 * @param $forContent bool
		 * @return bool
		 */
		$wgHooks['SkinCopyrightFooter'][] = function( $title, $type, &$msg, &$link, &$forContent ) {
			if( $type != 'history' ) {
				global $wgDBname, $wmgUseDualLicense;
				if ( in_array( $wgDBname, array( 'wikidatawiki', 'testwikidatawiki' ) ) ) {
					$msg = 'wikidata-copyright';
				} elseif ( $wmgUseDualLicense ) {
					$msg = array( 'wikimedia-copyright-dual' );
				} else {
					$msg = array( 'wikimedia-copyright' );
				}
				$forContent = false;
			}

			return true;
		};

		$wgHooks['EditPageCopyrightWarning'][] = function( $title, &$msg ) {
			global $wmgUseDualLicense;
			if ( $wmgUseDualLicense ) {
				$msg = array( 'wikimedia-copyrightwarning-dual' );
			} else {
				$msg = array( 'wikimedia-copyrightwarning' );
			}
			return true;
		};
	}
Comment 3 Andre Klapper 2014-02-27 11:55:08 UTC
https://gerrit.wikimedia.org/r/#/c/107281/ and https://gerrit.wikimedia.org/r/#/c/107284/ are merged - I wonder who could work on the rest?
Comment 4 Greg Grossmeier 2014-05-13 18:09:27 UTC
What's left?
Comment 5 Andre Klapper 2014-06-16 12:40:58 UTC
Reedy: What's left here?
Comment 6 Andre Klapper 2014-08-04 10:03:25 UTC
Reedy: What's left here?
Comment 7 Andre Klapper 2014-10-21 16:31:33 UTC
Reedy: What's left here? Last call.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links