commit bf96eca33707571994df4b29c50041fc047b9029
parent 4284132db5008d6f644e71680f2bb63636ccc5ae
Author: Dan Stillman <dstillman@zotero.org>
Date: Sat, 12 Aug 2006 04:44:58 +0000
Use alternate method of differentiating between no network connection and invalid repository response in _updateScrapersRemoteCallback(), since xmlhttp.noNetwork property is no longer available
(xmlhttp.status seems to turn into a very large integer when there's a network error--I can't imagine this a fairly reliable test, but, then, neither was the previous one, and at least at the moment we're not actually using the test for anything other than an appropriate debug message)
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/chrome/chromeFiles/content/scholar/xpcom/schema.js b/chrome/chromeFiles/content/scholar/xpcom/schema.js
@@ -288,7 +288,10 @@ Scholar.Schema = new function(){
**/
function _updateScrapersRemoteCallback(xmlhttp){
if (!xmlhttp.responseXML){
- if (!xmlhttp.noNetwork){
+ if (xmlhttp.status>1000){
+ Scholar.debug('No network connection', 2);
+ }
+ else {
Scholar.debug('Invalid response from repository', 2);
}
_setRepositoryTimer(SCHOLAR_CONFIG['REPOSITORY_RETRY_INTERVAL']);