Index: trunk/phase3/skins/common/ajaxwatch.js |
— | — | @@ -73,10 +73,7 @@ |
74 | 74 | return; |
75 | 75 | } |
76 | 76 | var response = request.responseText; |
77 | | - if( response.match(/^<err#>/) ) { |
78 | | - window.location.href = wgAjaxWatch.watchLinks[0].href; |
79 | | - return; |
80 | | - } else if( response.match(/^<w#>/) ) { |
| 77 | + if( response.match(/^<w#>/) ) { |
81 | 78 | wgAjaxWatch.watching = true; |
82 | 79 | wgAjaxWatch.setLinkText(wgAjaxWatch.unwatchMsg); |
83 | 80 | wgAjaxWatch.setLinkID("ca-unwatch"); |
— | — | @@ -86,6 +83,10 @@ |
87 | 84 | wgAjaxWatch.setLinkText(wgAjaxWatch.watchMsg); |
88 | 85 | wgAjaxWatch.setLinkID("ca-watch"); |
89 | 86 | wgAjaxWatch.setHref( 'watch' ); |
| 87 | + } else { |
| 88 | + // Either we got a <err#> error code or it just plain broke. |
| 89 | + window.location.href = wgAjaxWatch.watchLinks[0].href; |
| 90 | + return; |
90 | 91 | } |
91 | 92 | jsMsg( response.substr(4), 'watch' ); |
92 | 93 | wgAjaxWatch.inprogress = false; |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -223,6 +223,7 @@ |
224 | 224 | and the redirect deleted |
225 | 225 | * (bug 7071) Properly handle an 'oldid' passed to view or edit that doesn't |
226 | 226 | match the given title. Fixes inconsistencies with talk, history, edit links. |
| 227 | +* (bug 10397) Fix AJAX watch error fallback when we receive a bogus result |
227 | 228 | |
228 | 229 | |
229 | 230 | == API changes since 1.10 == |