mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
Merge "Don't show PostEdit message if we made a null edit"
This commit is contained in:
commit
ccdc215a98
|
@ -434,9 +434,8 @@ ve.init.mw.ViewPageTarget.prototype.onSave = function ( html, categoriesHtml, ne
|
|||
if ( !this.pageExists || this.restoring ) {
|
||||
// This is a page creation or restoration, refresh the page
|
||||
this.tearDownBeforeUnloadHandler();
|
||||
newUrlParams = {
|
||||
'venotify': this.restoring ? 'restored' : 'created'
|
||||
};
|
||||
newUrlParams = newid === undefined ? {} : { venotify: this.restoring ? 'restored' : 'created' };
|
||||
|
||||
if ( isRedirect ) {
|
||||
newUrlParams.redirect = 'no';
|
||||
}
|
||||
|
@ -475,10 +474,12 @@ ve.init.mw.ViewPageTarget.prototype.onSave = function ( html, categoriesHtml, ne
|
|||
this.setupSectionEditLinks();
|
||||
this.tearDownBeforeUnloadHandler();
|
||||
this.deactivate( true );
|
||||
mw.hook( 'postEdit' ).fire( {
|
||||
'message':
|
||||
ve.msg( 'postedit-confirmation-saved', mw.user )
|
||||
} );
|
||||
if ( newid !== undefined ) {
|
||||
mw.hook( 'postEdit' ).fire( {
|
||||
'message':
|
||||
ve.msg( 'postedit-confirmation-saved', mw.user )
|
||||
} );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue