jenkins-bot has submitted this change and it was merged.

Change subject: Re-add $evilDataValueMap global, still used in DataModel 0.8.2
......................................................................


Re-add $evilDataValueMap global, still used in DataModel 0.8.2

Bug: 69542
Change-Id: I4cfeb1206f3007b00c57952c19d9c76ea6171fd6
---
M lib/WikibaseLib.php
1 file changed, 18 insertions(+), 1 deletion(-)

Approvals:
  Aude: Looks good to me, approved
  Jeroen De Dauw: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/lib/WikibaseLib.php b/lib/WikibaseLib.php
index afe7ad9..b45d1fc 100644
--- a/lib/WikibaseLib.php
+++ b/lib/WikibaseLib.php
@@ -52,6 +52,23 @@
        include_once( __DIR__ . '/../vendor/autoload.php' );
 }
 
+// needed for deserializing Snaks in DataModel 0.8.2
+if( !array_key_exists( 'evilDataValueMap', $GLOBALS ) ) {
+       $GLOBALS['evilDataValueMap'] = array();
+}
+
+$GLOBALS['evilDataValueMap'] = array_merge(
+       $GLOBALS['evilDataValueMap'],
+        array(
+               'globecoordinate' => 'DataValues\GlobeCoordinateValue',
+               'monolingualtext' => 'DataValues\MonolingualTextValue',
+               'multilingualtext' => 'DataValues\MultilingualTextValue',
+               'quantity' => 'DataValues\QuantityValue',
+               'time' => 'DataValues\TimeValue',
+               'wikibase-entityid' => 
'Wikibase\DataModel\Entity\EntityIdValue',
+        )
+);
+
 call_user_func( function() {
        global $wgExtensionCredits, $wgJobClasses, $wgHooks, 
$wgResourceModules, $wgMessagesDirs;
 
@@ -69,7 +86,7 @@
        define( 'SUMMARY_MAX_LENGTH', 250 );
 
        // i18n
-       $wgMessagesDirs['WikibaseLib']           = __DIR__ . '/i18n';
+       $wgMessagesDirs['WikibaseLib']             = __DIR__ . '/i18n';
 
        $wgJobClasses['ChangeNotification'] = 'Wikibase\ChangeNotificationJob';
 

-- 
To view, visit https://gerrit.wikimedia.org/r/154259
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4cfeb1206f3007b00c57952c19d9c76ea6171fd6
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.24-wmf17
Gerrit-Owner: Aude <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: WikidataJenkins <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to