Update permanent link and PDF download link oldids on save

Bug: T74461
Change-Id: Ic66de6e685d23cac1c9870529f42e1aa6348ac7a
This commit is contained in:
Alex Monk 2015-01-28 13:10:22 -08:00
parent d64aa82c4a
commit f6bf40a19a

View file

@ -549,6 +549,15 @@ ve.init.mw.ViewPageTarget.prototype.onSave = function (
lastModified,
contentSub
);
if ( newid !== undefined ) {
$( '#t-permalink a, #coll-download-as-rl a' ).each( function () {
var uri = new mw.Uri( $( this ).attr( 'href' ) );
uri.query.oldid = newid;
$( this ).attr( 'href', uri.toString() );
} );
}
this.setupSectionEditLinks();
// Tear down the target now that we're done saving
// Not passing trackMechanism because this isn't an abort action