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

Change subject: Don't show "Restore page" button when editing most recent 
version
......................................................................


Don't show "Restore page" button when editing most recent version

Change-Id: Iaeb11e0d5323e0276e66fc4c994d705cde68411d
---
M modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js 
b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js
index a3ded23..5a3161c 100644
--- a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js
+++ b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js
@@ -70,7 +70,7 @@
                'commands': ['bold', 'italic', 'mwLink', 'undo', 'redo', 
'indent', 'outdent']
        };
        this.currentUri = currentUri;
-       this.restoring = !!this.oldid;
+       this.restoring = this.oldid === mw.config.get( 'wgCurRevisionId' );
        this.section = currentUri.query.vesection || null;
        this.namespaceName = mw.config.get( 'wgCanonicalNamespace' );
        this.viewUri = new mw.Uri( mw.util.wikiGetlink( this.pageName ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaeb11e0d5323e0276e66fc4c994d705cde68411d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
Gerrit-Reviewer: Trevor Parscal <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to