From cc3d81da93e7f7ff0f187ad6250853c328e65bc6 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 31 May 2015 16:59:10 -0400 Subject: [PATCH] Add Zotero.DataObjectUtilities.generateKey() For now, this just calls Zotero.Utilities.generateObjectKey(), but this function makes more sense in DataObjectUtilities. It does need to be accessible to the connectors, but if it's possible to add an alias in Zotero.Utilities just for the connectors, it'd probably be better to do that and use Zotero.DataObjectUtilities.generateKey() elsewhere. --- chrome/content/zotero/xpcom/data/dataObjectUtilities.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/chrome/content/zotero/xpcom/data/dataObjectUtilities.js b/chrome/content/zotero/xpcom/data/dataObjectUtilities.js index 1cf0d3128..d7bb3b305 100644 --- a/chrome/content/zotero/xpcom/data/dataObjectUtilities.js +++ b/chrome/content/zotero/xpcom/data/dataObjectUtilities.js @@ -43,6 +43,12 @@ Zotero.DataObjectUtilities = { return intValue; }, + + generateKey: function () { + return Zotero.Utilities.generateObjectKey(); + }, + + "checkKey": function(key) { if (!key) return null; if (!Zotero.Utilities.isValidObjectKey(key)) {