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:
parent
fd45032210
commit
cc3d81da93
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user