mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
Merge "Fix post-edit notification after switching from old wikitext editor"
This commit is contained in:
commit
161a6a0623
|
@ -642,11 +642,16 @@ ve.init.mw.ArticleTarget.prototype.saveComplete = function ( data ) {
|
|||
if ( !this.pageExists || this.restoring || !this.isViewPage ) {
|
||||
// Teardown the target, ensuring auto-save data is cleared
|
||||
this.teardown().then( function () {
|
||||
|
||||
var newUrlParams = !target.pageExists || target.restoring ?
|
||||
( data.newrevid === undefined ? {} : { venotify: target.restoring ? 'restored' : 'created' } ) :
|
||||
{};
|
||||
|
||||
var newUrlParams = {};
|
||||
if ( data.newrevid !== undefined ) {
|
||||
if ( target.restoring ) {
|
||||
newUrlParams.venotify = 'restored';
|
||||
} else if ( !target.pageExists ) {
|
||||
newUrlParams.venotify = 'created';
|
||||
} else {
|
||||
newUrlParams.venotify = 'saved';
|
||||
}
|
||||
}
|
||||
if ( data.isRedirect ) {
|
||||
newUrlParams.redirect = 'no';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue