jenkins-bot has submitted this change and it was merged.
Change subject: Change license text of m.wikidata.org to match the desktop one
......................................................................
Change license text of m.wikidata.org to match the desktop one
Requires d7c4708ce2 in MobileFrontend.
In the future we may or may not want to switch to a shorter text for
mobile, but as a first step this is needed.
Bug: 112088
Change-Id: I12da80af9bc1eb4c2746eddef0fb9ea18e6f435b
---
M WikimediaMessages.hooks.php
1 file changed, 11 insertions(+), 6 deletions(-)
Approvals:
Jdlrobson: Looks good to me, approved
jenkins-bot: Verified
diff --git a/WikimediaMessages.hooks.php b/WikimediaMessages.hooks.php
index 282c1f9..94b9f44 100644
--- a/WikimediaMessages.hooks.php
+++ b/WikimediaMessages.hooks.php
@@ -114,16 +114,21 @@
* Override with Wikimedia's site-specific copyright message defaults
with the CC/GFDL
* semi-dual license fun!
*
- * @param $link
- * @param $context
- * @param $attribs
+ * @param string $link
+ * @param string $context
+ * @param array $attribs
+ * @param string $msg
*
* @return bool
*/
- public static function onMobileLicenseLink( &$link, $context, $attribs
) {
- global $wgRightsUrl;
+ public static function onMobileLicenseLink( &$link, $context, array
$attribs, &$msg ) {
+ global $wgRightsUrl, $wgDBname;
- if( strpos( $wgRightsUrl,
'creativecommons.org/licenses/by-sa/3.0' ) !== false ) {
+ if ( in_array( $wgDBname, array( 'wikidatawiki',
'testwikidatawiki' ) ) ) {
+ // Wikidata needs its own special message. See T112088
+ $msg = 'wikidata-copyright';
+ $link = ' '; // Set this to space to avoid confusion
(empty string wont work)
+ } elseif( strpos( $wgRightsUrl,
'creativecommons.org/licenses/by-sa/3.0' ) !== false ) {
// We only display the dual licensing stack in the
editor and talk interfaces
if ( $context === 'editor' || $context === 'talk' ) {
$link = wfMessage(
'wikimedia-mobile-license-links' )->plain();
--
To view, visit https://gerrit.wikimedia.org/r/242342
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I12da80af9bc1eb4c2746eddef0fb9ea18e6f435b
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/WikimediaMessages
Gerrit-Branch: master
Gerrit-Owner: Hoo man <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: JanZerebecki <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits