Catrope has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/59968


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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/68/59968/1

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: newchange
Gerrit-Change-Id: Iaeb11e0d5323e0276e66fc4c994d705cde68411d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>

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

Reply via email to