- Fix errors when auto-saving proxies with transparent setting off (due to proxy variable not being set)
- Fixed display of proxy settings validation failure window - Tweaked validation failure window title
This commit is contained in:
parent
03a0cced19
commit
3d615f2b9c
3 changed files with 27 additions and 18 deletions
|
@ -111,8 +111,13 @@ var Zotero_ProxyEditor = new function() {
|
|||
|
||||
var hasErrors = proxy.validate();
|
||||
if(hasErrors) {
|
||||
Components.interfaces.nsIPromptService.getService().alert(window,
|
||||
Zotero.getString("proxies.error"), Zotero.getString("proxies.error."+hasErrors));
|
||||
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
|
||||
.getService(Components.interfaces.nsIPromptService);
|
||||
promptService.alert(
|
||||
window,
|
||||
Zotero.getString("proxies.error"),
|
||||
Zotero.getString("proxies.error." + hasErrors)
|
||||
);
|
||||
if(window.arguments && window.arguments[0]) proxy.revert();
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -95,10 +95,16 @@ Zotero.Proxies = new function() {
|
|||
Components.utils.reportError(e);
|
||||
}
|
||||
|
||||
if(!transparent) {
|
||||
if (!proxy) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// if transparent is turned off, just save the proxy
|
||||
if(!transparent) {
|
||||
proxy.save();
|
||||
} else if(proxy) {
|
||||
break;
|
||||
}
|
||||
|
||||
// otherwise, make sure we want it
|
||||
var io = {site:proxy.hosts[0], proxy:channel.URI.hostPort};
|
||||
var window = Components.classes["@mozilla.org/appshell/window-mediator;1"]
|
||||
|
@ -111,11 +117,9 @@ Zotero.Proxies = new function() {
|
|||
transparent = false;
|
||||
Zotero.Prefs.set("proxies.transparent", false);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// try to get an applicable proxy
|
||||
if(transparent) {
|
||||
|
|
|
@ -509,7 +509,7 @@ sync.storage.kbRemaining = %SKB remaining
|
|||
sync.storage.none = None
|
||||
|
||||
proxies.multiSite = Multi-Site
|
||||
proxies.error = Information Validation Error
|
||||
proxies.error = Invalid Proxy Settings
|
||||
proxies.error.scheme.noHTTP = Valid proxy schemes must start with "http://" or "https://"
|
||||
proxies.error.host.invalid = You must enter a full hostname for the site served by this proxy (e.g., jstor.org).
|
||||
proxies.error.scheme.noHost = A multi-site proxy scheme must contain the host variable (%h).
|
||||
|
|
Loading…
Add table
Reference in a new issue