ve.init.mw.Target: Update TitleBlacklist error code

The error code has changed after T115258 and is now consistently
'titleblacklist-forbidden' for all TitleBlacklist errors.

The API now also provides information about the exact error message to
display (error.message) and the TitleBlacklist rule that matched
(error.line), but we probably don't have that message client-side, so
we're not trying to display it. Maybe when we can load it (T40280).

Bug: T116198
Change-Id: I32fccc7d0b2b66c739d59db05c568a56d9f07eec
This commit is contained in:
Bartosz Dziewoński 2015-11-05 04:07:38 +01:00
parent 8afae11a1c
commit 4a1a9bbf82

View file

@ -586,7 +586,7 @@ ve.init.mw.Target.prototype.saveFail = function ( doc, saveData, jqXHR, status,
} else if ( data.error && data.error.code === 'pagedeleted' ) {
this.saveErrorPageDeleted();
return;
} else if ( data.error && data.error.code === 'titleblacklist-forbidden-edit' ) {
} else if ( data.error && data.error.code === 'titleblacklist-forbidden' ) {
this.saveErrorTitleBlacklist();
return;
}