mirror of
https://github.com/zotero/zotero.git
synced 2026-10-09 03:18:01 +00:00
attempt to be better about preserving EZProxy URL. unfortunately, this won't fix everything, since if the domain of the saved URL is different from the domain of the accessed URL, there is no way to map the proxy. as far as I know, this only happens with JSTOR (where the stable URL domain is links.jstor.org instead of jstor.org).
This commit is contained in:
parent
a9cb13710c
commit
654f9c205d
1 changed files with 8 additions and 3 deletions
|
|
@ -91,9 +91,9 @@
|
|||
* _exportFileDirectory - the directory to which files will be exported
|
||||
* _hasBOM - whether the given file ready to be imported has a BOM or not
|
||||
*
|
||||
* WEB-ONLY PRIVATE PROPERTIES:
|
||||
* WEB-ONLY PROPERTIES:
|
||||
*
|
||||
* _locationIsProxied - whether the URL being scraped is going through
|
||||
* locationIsProxied - whether the URL being scraped is going through
|
||||
* an EZProxy
|
||||
* _downloadAssociatedFiles - whether to download content, according to
|
||||
* preferences
|
||||
|
|
@ -1081,6 +1081,12 @@ Zotero.Translate.prototype._itemDone = function(item, attachedTo) {
|
|||
throw("item has no title");
|
||||
}
|
||||
|
||||
// if item was accessed through a proxy, ensure that the proxy
|
||||
// address remains in the accessed version
|
||||
if(this.locationIsProxied && item.url) {
|
||||
item.url = Zotero.Ingester.ProxyMonitor.properToProxy(item.url);
|
||||
}
|
||||
|
||||
// create new item
|
||||
if(type == "attachment") {
|
||||
if(this.type != "import") {
|
||||
|
|
@ -1089,7 +1095,6 @@ Zotero.Translate.prototype._itemDone = function(item, attachedTo) {
|
|||
}
|
||||
|
||||
Zotero.debug("adding attachment");
|
||||
Zotero.debug(item);
|
||||
|
||||
if(!item.path) {
|
||||
// create from URL
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue