John Erling Blad has submitted this change and it was merged.
Change subject: noexternallanglinks needs to be serialized
......................................................................
noexternallanglinks needs to be serialized
- there was a reason we serialized it...
LinksUpdate does array_diff_assoc. If the property is set (as array), and
compared
with empty property (a string), then we have a problem.
If the array values are strings, regardless if it's set or not then all is good.
Change-Id: Ie8796ebcc774b3c9aa91bc7c0555917ec66b66dd
---
M client/includes/LangLinkHandler.php
1 file changed, 3 insertions(+), 6 deletions(-)
Approvals:
John Erling Blad: Verified; Looks good to me, approved
jenkins-bot: Checked
diff --git a/client/includes/LangLinkHandler.php
b/client/includes/LangLinkHandler.php
index 6226f75..0cf009d 100644
--- a/client/includes/LangLinkHandler.php
+++ b/client/includes/LangLinkHandler.php
@@ -203,11 +203,8 @@
*/
public function getNoExternalLangLinks( ParserOutput $out ) {
wfProfileIn( __METHOD__ );
- $nel = $out->getProperty( 'noexternallanglinks' );
-
- if( empty( $nel ) ) {
- $nel = array();
- }
+ $property = $out->getProperty( 'noexternallanglinks' );
+ $nel = is_string( $property ) ? unserialize( $property ) :
array();
wfProfileOut( __METHOD__ );
return $nel;
@@ -224,7 +221,7 @@
*/
public function setNoExternalLangLinks( ParserOutput $out, array
$noexternallanglinks ) {
wfProfileIn( __METHOD__ );
- $out->setProperty( 'noexternallanglinks', $noexternallanglinks
);
+ $out->setProperty( 'noexternallanglinks', serialize(
$noexternallanglinks ) );
wfProfileOut( __METHOD__ );
}
--
To view, visit https://gerrit.wikimedia.org/r/53768
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie8796ebcc774b3c9aa91bc7c0555917ec66b66dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: John Erling Blad <[email protected]>
Gerrit-Reviewer: Tobias Gritschacher <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits