commit cc3d81da93e7f7ff0f187ad6250853c328e65bc6
parent fd45032210afe4926edf00969b840f96efb198c5
Author: Dan Stillman <dstillman@zotero.org>
Date: Sun, 31 May 2015 16:59:10 -0400
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.
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git 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)) {