r23506 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23505‎ | r23506 | r23507 >
Date:15:05, 28 June 2007
Author:brion
Status:old
Tags:
Comment:
* (bug 10397) Fix AJAX watch error fallback when we receive a bogus result
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/skins/common/ajaxwatch.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/ajaxwatch.js
@@ -73,10 +73,7 @@
7474 return;
7575 }
7676 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#>/) ) {
8178 wgAjaxWatch.watching = true;
8279 wgAjaxWatch.setLinkText(wgAjaxWatch.unwatchMsg);
8380 wgAjaxWatch.setLinkID("ca-unwatch");
@@ -86,6 +83,10 @@
8784 wgAjaxWatch.setLinkText(wgAjaxWatch.watchMsg);
8885 wgAjaxWatch.setLinkID("ca-watch");
8986 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;
9091 }
9192 jsMsg( response.substr(4), 'watch' );
9293 wgAjaxWatch.inprogress = false;
Index: trunk/phase3/RELEASE-NOTES
@@ -223,6 +223,7 @@
224224 and the redirect deleted
225225 * (bug 7071) Properly handle an 'oldid' passed to view or edit that doesn't
226226 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
227228
228229
229230 == API changes since 1.10 ==

Follow-up revisions

RevisionCommit summaryAuthorDate
r23581Merged revisions 23406-23580 via svnmerge from...david04:50, 30 June 2007

Status & tagging log