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

Change subject: Reuse the element identifiers given by RESTBase
......................................................................


Reuse the element identifiers given by RESTBase

The section saved based on an outdated source page content
should be correctly loaded and aligned with new source sections.

See client-side changes:
Icc5dff9ba5cf79c599021f2a633024a257b397fb

Bug: T102584
Change-Id: Iedbf36ea872bee8149e842751fd7bb05b4b870b1
---
M lineardoc/Doc.js
1 file changed, 6 insertions(+), 1 deletion(-)

Approvals:
  Amire80: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lineardoc/Doc.js b/lineardoc/Doc.js
index 0647e1b..0f34754 100644
--- a/lineardoc/Doc.js
+++ b/lineardoc/Doc.js
@@ -83,7 +83,12 @@
                item = this.items[ i ];
                if ( this.items[ i ].type === 'open' ) {
                        tag = Utils.cloneOpenTag( item.item );
-                       tag.attributes.id = getNextId( 'block' );
+                       if ( tag.attributes.id ) {
+                               // Kept for restoring the old articles.
+                               tag.attributes[ 'data-seqid' ] = getNextId( 
'block' );
+                       } else {
+                               tag.attributes.id = getNextId( 'block' );
+                       }
                        newDoc.addItem( item.type, tag );
                } else if ( this.items[ i ].type !== 'textblock' ) {
                        newDoc.addItem( item.type, item.item );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iedbf36ea872bee8149e842751fd7bb05b4b870b1
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/services/cxserver
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>
Gerrit-Reviewer: Amire80 <[email protected]>
Gerrit-Reviewer: Santhosh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to