and the redirect deleted
* (bug 7071) Properly handle an 'oldid' passed to view or edit that doesn't
match the given title. Fixes inconsistencies with talk, history, edit links.
+* (bug 10397) Fix AJAX watch error fallback when we receive a bogus result
== API changes since 1.10 ==
return;
}
var response = request.responseText;
- if( response.match(/^<err#>/) ) {
- window.location.href = wgAjaxWatch.watchLinks[0].href;
- return;
- } else if( response.match(/^<w#>/) ) {
+ if( response.match(/^<w#>/) ) {
wgAjaxWatch.watching = true;
wgAjaxWatch.setLinkText(wgAjaxWatch.unwatchMsg);
wgAjaxWatch.setLinkID("ca-unwatch");
wgAjaxWatch.setLinkText(wgAjaxWatch.watchMsg);
wgAjaxWatch.setLinkID("ca-watch");
wgAjaxWatch.setHref( 'watch' );
+ } else {
+ // Either we got a <err#> error code or it just plain broke.
+ window.location.href = wgAjaxWatch.watchLinks[0].href;
+ return;
}
jsMsg( response.substr(4), 'watch' );
wgAjaxWatch.inprogress = false;