Show incompatible version dialog in Standalone if connector is outdated
This commit is contained in:
parent
4dcaf2907f
commit
4e0da80afc
2 changed files with 24 additions and 2 deletions
|
@ -409,5 +409,26 @@ Zotero.Server.Connector.Ping.prototype = {
|
|||
|
||||
|
||||
// XXX For compatibility with older connectors; to be removed
|
||||
Zotero.Server.Endpoints["/translate/list"] = Zotero.Server.Connector.GetTranslators;
|
||||
Zotero.Server.Endpoints["/translate/save"] = Zotero.Server.Connector.SavePage;
|
||||
Zotero.Server.Connector.IncompatibleVersion = function() {};
|
||||
Zotero.Server.Connector.IncompatibleVersion._errorShown = false
|
||||
Zotero.Server.Endpoints["/translate/list"] = Zotero.Server.Connector.IncompatibleVersion;
|
||||
Zotero.Server.Endpoints["/translate/detect"] = Zotero.Server.Connector.IncompatibleVersion;
|
||||
Zotero.Server.Endpoints["/translate/save"] = Zotero.Server.Connector.IncompatibleVersion;
|
||||
Zotero.Server.Endpoints["/translate/select"] = Zotero.Server.Connector.IncompatibleVersion;
|
||||
Zotero.Server.Connector.IncompatibleVersion.prototype = {
|
||||
"supportedMethods":["POST"],
|
||||
"supportedDataTypes":["application/json"],
|
||||
|
||||
"init":function(postData, sendResponseCallback) {
|
||||
sendResponseCallback(404);
|
||||
if(Zotero.Server.Connector.IncompatibleVersion._errorShown) return;
|
||||
|
||||
var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].
|
||||
createInstance(Components.interfaces.nsIPromptService);
|
||||
ps.confirm(null,
|
||||
Zotero.getString("connector.error.title"),
|
||||
Zotero.getString("integration.error.incompatibleVersion2",
|
||||
["Standalone "+Zotero.version, "Connector", "2.1.999"]));
|
||||
Zotero.Server.Connector.IncompatibleVersion._errorShown = true;
|
||||
}
|
||||
};
|
|
@ -733,4 +733,5 @@ locate.manageLocateEngines = Manage Lookup Engines…
|
|||
|
||||
standalone.corruptInstallation = Your Zotero Standalone installation appears to be corrupted due to a failed auto-update. While Zotero may continue to function, to avoid potential bugs, please download the latest version of Zotero Standalone from http://zotero.org/support/standalone as soon as possible.
|
||||
|
||||
connector.error.title = Zotero Connector Error
|
||||
connector.standaloneOpen = Your database cannot be accessed because Zotero Standalone is currently open. Please view your items in Zotero Standalone.
|
Loading…
Reference in a new issue