commit 0f8c3e7669bb882a6a1c0b7ccf74193619a08087
parent fe319f033b888c4f0b53d4d7bb8e32630fc9a393
Author: Simon Kornblith <simon@simonster.com>
Date: Thu, 14 Sep 2006 02:51:45 +0000
- makes proxy detection work with domain-based EZProxies (I think)
- fixes Word Integration bugs
Diffstat:
4 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/Zotero.dot b/Zotero.dot
Binary files differ.
diff --git a/Zotero.dot.dmg b/Zotero.dot.dmg
Binary files differ.
diff --git a/chrome/chromeFiles/content/scholar/xpcom/ingester.js b/chrome/chromeFiles/content/scholar/xpcom/ingester.js
@@ -58,7 +58,9 @@ Scholar.Ingester.ProxyMonitor = new function() {
}
}
}
-
+ } catch(e) {}
+
+ try {
// find ezproxies
if(channel.getResponseHeader("Server") == "EZproxy") {
// We're connected to an EZproxy
@@ -93,7 +95,9 @@ Scholar.Ingester.ProxyMonitor = new function() {
return;
}
- if(channel.URI.host == newURI.host && channel.URI.port != newURI.port) {
+ if((channel.URI.host == newURI.host && channel.URI.port != newURI.port) ||
+ (newURI.host != channel.URI.host &&
+ newURI.hostPort.substr(newURI.hostPort.length-channel.URI.hostPort.length) == channel.URI.hostPort)) {
// Different ports but the same server means EZproxy active
Scholar.debug("EZProxy: host "+newURI.hostPort+" is really "+properURI.hostPort);
diff --git a/chrome/chromeFiles/content/scholar/xpcom/integration.js b/chrome/chromeFiles/content/scholar/xpcom/integration.js
@@ -531,8 +531,11 @@ Scholar.Integration.SOAP = new function() {
}
Scholar.Integration.Session = function(styleID) {
- this.styleID = styleID;
- this.style = Scholar.Cite.getStyle(this.styleID);
+ if(styleID) {
+ this.styleID = styleID;
+ this.style = Scholar.Cite.getStyle(this.styleID);
+ }
+
this.citationSet = new Scholar.Integration.CitationSet(this.style);
this.citationFactory = new Scholar.Integration.CitationFactory(this.style);
}
@@ -616,7 +619,7 @@ Scholar.Integration.CitationSet = function(style) {
this.citationsByIndex = new Object();
this.lastItemID = null;
- this.style = style;
+ if(style) this.style = style;
}
/*
@@ -669,7 +672,7 @@ Scholar.Integration.CitationSet.prototype.addCitation = function(citation) {
* a class to generate and cache citations
*/
Scholar.Integration.CitationFactory = function(style) {
- this.style = style;
+ if(style) this.style = style;
this.cache = new Object();
this.dateModified = new Object();
this.items = new Array();