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.
This commit is contained in:
Dan Stillman 2015-05-31 16:59:10 -04:00
parent fd45032210
commit cc3d81da93

View file

@ -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)) {