Jeroen De Dauw has submitted this change and it was merged.

Change subject: Remove revision from FetchedContent
......................................................................


Remove revision from FetchedContent

revision is not passed in wbUsedEntities anymore.

Change-Id: Ied448910055dc32b841be7d05a8718f1d1df2ca3
---
M lib/resources/wikibase.store/store.FetchedContent.js
M lib/resources/wikibase.store/store.FetchedContentUnserializer.js
2 files changed, 1 insertion(+), 25 deletions(-)

Approvals:
  Jeroen De Dauw: Looks good to me, approved



diff --git a/lib/resources/wikibase.store/store.FetchedContent.js 
b/lib/resources/wikibase.store/store.FetchedContent.js
index 933ece6..2471350 100644
--- a/lib/resources/wikibase.store/store.FetchedContent.js
+++ b/lib/resources/wikibase.store/store.FetchedContent.js
@@ -9,23 +9,16 @@
 
        /**
         * Constructor for objects representing some kind of MediaWiki content 
fetched from a store.
-        * Holds the actual content as well as some meta information such as 
the fetched revision and
-        * the related title where the content can be found on the wiki.
+        * Holds the actual content as well as the related title where the 
content can be found on the wiki.
         *
         * TODO: This is just a very basic wrapper for contents right now. This 
could very will grow
         *       into something more sophisticated system which is aware of 
different content models,
         *       which would probably result into one constructor (or strategy) 
per content type.
         *       E.g. "FetchedEntity", etc.
         *
-        * TODO: Revision should not be optional and probably not null if 
newest revision fetched.
-        *       Currently we need this because we create FetchedContent for 
entities the entityselector
-        *       provides (without a revision ID, which is fine from the entity 
selector's perspective).
-        *       This should be addressed if we do above TODO.
-        *
         * @param {Object} data Should contain the following fields:
         *        - content {*} The content which has been fetched
         *        - title {mw.Title} The page the content is related to
-        *        - revision {number} (optional) the revision which has been 
fetched.
         *
         * @constructor
         * @since 0.4
@@ -38,10 +31,6 @@
                        throw new Error( 'Can not create fetched content 
without related title information in field "title"' );
                }
                data = $.extend( {}, data ); // kill reference, prevent from 
outside modification
-
-               if( typeof data.revision !== 'number' ) {
-                       data.revision = null;
-               }
 
                this._data = data;
        };
@@ -75,18 +64,6 @@
                 */
                getTitle: function() {
                        return this._data.title;
-               },
-
-               /**
-                * Returns the revision in which the content has been fetched. 
Might be null if the newest
-                * version has been fetched explicitly.
-                *
-                * @since 0.4
-                *
-                * @return number
-                */
-               getRevision: function() {
-                       return this._data.revision;
                }
        } );
 
diff --git a/lib/resources/wikibase.store/store.FetchedContentUnserializer.js 
b/lib/resources/wikibase.store/store.FetchedContentUnserializer.js
index 686a586..6c93906 100644
--- a/lib/resources/wikibase.store/store.FetchedContentUnserializer.js
+++ b/lib/resources/wikibase.store/store.FetchedContentUnserializer.js
@@ -37,7 +37,6 @@
 
                        return new wb.store.FetchedContent( {
                                title: title,
-                               revision: serialization.revision,
                                content: content
                        } );
                }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ied448910055dc32b841be7d05a8718f1d1df2ca3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang <adrian.l...@wikimedia.de>
Gerrit-Reviewer: Jeroen De Dauw <jeroended...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to