Hoo man has uploaded a new change for review.
https://gerrit.wikimedia.org/r/230275
Change subject: Update Wikibase: Don't write change rows where
LENGTH(change_info) > 65500
......................................................................
Update Wikibase: Don't write change rows where LENGTH(change_info) > 65500
Change-Id: Ie86c342955484ac8f086864c3f5932b829a46ac5
---
M composer.lock
M extensions/Wikibase/lib/includes/changes/ChangeRow.php
M vendor/composer/installed.json
3 files changed, 25 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata
refs/changes/75/230275/1
diff --git a/composer.lock b/composer.lock
index 412d4e1..943861f 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1325,7 +1325,7 @@
"source": {
"type": "git",
"url":
"https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Wikibase.git",
- "reference": "36c2757516fc249d1120e4ca59cd07b5272fa6dd"
+ "reference": "c45e55165355fe147f42e3a819c63085692c6c8a"
},
"require": {
"data-values/common": "~0.2.0",
@@ -1403,7 +1403,7 @@
"issues": "https://phabricator.wikimedia.org/",
"irc": "irc://irc.freenode.net/wikidata"
},
- "time": "2015-08-07 19:09:13"
+ "time": "2015-08-08 02:34:15"
},
{
"name": "wikibase/wikimedia-badges",
diff --git a/extensions/Wikibase/lib/includes/changes/ChangeRow.php
b/extensions/Wikibase/lib/includes/changes/ChangeRow.php
index 1dc7856..d84ed13 100644
--- a/extensions/Wikibase/lib/includes/changes/ChangeRow.php
+++ b/extensions/Wikibase/lib/includes/changes/ChangeRow.php
@@ -19,6 +19,27 @@
class ChangeRow extends ORMRow implements Change {
/**
+ * HORRIBLE HACK: Overwritten to dissallow to large change_info entries.
+ * Bugs: T108130 108246
+ *
+ * @param string|null $functionName
+ *
+ * @return bool Success indicator
+ */
+ public function save( $functionName = null ) {
+ $infoLength = strlen( $this->serializeInfo( $this->getInfo() )
);
+ if ( $infoLength > 65500 ) {
+ return true;
+ }
+
+ if ( $this->hasIdField() ) {
+ return $this->table->updateRow( $this, $functionName );
+ } else {
+ return $this->table->insertRow( $this, $functionName );
+ }
+ }
+
+ /**
* Field for caching the linked user.
*
* @since 0.1
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 3c0e298..0fa6269 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -1417,7 +1417,7 @@
"source": {
"type": "git",
"url":
"https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Wikibase.git",
- "reference": "36c2757516fc249d1120e4ca59cd07b5272fa6dd"
+ "reference": "c45e55165355fe147f42e3a819c63085692c6c8a"
},
"require": {
"data-values/common": "~0.2.0",
@@ -1446,7 +1446,7 @@
"require-dev": {
"squizlabs/php_codesniffer": "~2.1"
},
- "time": "2015-08-07 19:09:13",
+ "time": "2015-08-08 02:34:15",
"type": "mediawiki-extension",
"installation-source": "source",
"autoload": {
--
To view, visit https://gerrit.wikimedia.org/r/230275
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie86c342955484ac8f086864c3f5932b829a46ac5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikidata
Gerrit-Branch: wmf/1.26wmf16
Gerrit-Owner: Hoo man <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits