From 2e4f75a9f0429cde65b0df56ddc9bfc7262d2fe6 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Thu, 15 Aug 2013 14:27:31 -0400 Subject: [PATCH] Rename Zotero.ID.getKey() to Zotero.Utilites.generateObjectKey() (To make it accessible to the connector) --- chrome/content/zotero/xpcom/data/collection.js | 2 +- chrome/content/zotero/xpcom/data/creator.js | 2 +- chrome/content/zotero/xpcom/data/item.js | 2 +- chrome/content/zotero/xpcom/data/tag.js | 2 +- chrome/content/zotero/xpcom/id.js | 7 ------- chrome/content/zotero/xpcom/schema.js | 12 ++++++------ chrome/content/zotero/xpcom/utilities.js | 9 +++++++++ 7 files changed, 19 insertions(+), 17 deletions(-) diff --git a/chrome/content/zotero/xpcom/data/collection.js b/chrome/content/zotero/xpcom/data/collection.js index 70284f3ca0..8f501aa48b 100644 --- a/chrome/content/zotero/xpcom/data/collection.js +++ b/chrome/content/zotero/xpcom/data/collection.js @@ -1497,5 +1497,5 @@ Zotero.Collection.prototype._refreshChildCollections = function () { Zotero.Collection.prototype._generateKey = function () { - return Zotero.ID.getKey(); + return Zotero.Utilites.generateObjectKey(); } diff --git a/chrome/content/zotero/xpcom/data/creator.js b/chrome/content/zotero/xpcom/data/creator.js index c9051d8b8a..738e98d7ca 100644 --- a/chrome/content/zotero/xpcom/data/creator.js +++ b/chrome/content/zotero/xpcom/data/creator.js @@ -552,7 +552,7 @@ Zotero.Creator.prototype._checkValue = function (field, value) { Zotero.Creator.prototype._generateKey = function () { - return Zotero.ID.getKey(); + return Zotero.Utilites.generateObjectKey(); } diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index b04c12bcbb..fecb0d847c 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -5193,7 +5193,7 @@ Zotero.Item.prototype._clearFieldChange = function (field) { Zotero.Item.prototype._generateKey = function () { - return Zotero.ID.getKey(); + return Zotero.Utilites.generateObjectKey(); } diff --git a/chrome/content/zotero/xpcom/data/tag.js b/chrome/content/zotero/xpcom/data/tag.js index 810a142f3d..5aaaaf0994 100644 --- a/chrome/content/zotero/xpcom/data/tag.js +++ b/chrome/content/zotero/xpcom/data/tag.js @@ -773,6 +773,6 @@ Zotero.Tag.prototype._prepFieldChange = function (field) { Zotero.Tag.prototype._generateKey = function () { - return Zotero.ID.getKey(); + return Zotero.Utilites.generateObjectKey(); } diff --git a/chrome/content/zotero/xpcom/id.js b/chrome/content/zotero/xpcom/id.js index c444dc2a76..120f9527c3 100644 --- a/chrome/content/zotero/xpcom/id.js +++ b/chrome/content/zotero/xpcom/id.js @@ -86,13 +86,6 @@ Zotero.ID_Tracker = function () { } - function getKey() { - // TODO: add 'L' and 'Y' after 3.0.11 cut-off - var baseString = "23456789ABCDEFGHIJKMNPQRSTUVWXZ"; - return Zotero.randomString(8, baseString); - } - - this.isValidKey = function (value) { var re = /^[23456789ABCDEFGHIJKLMNPQRSTUVWXYZ]{8}$/ return re.test(value); diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js index 33c81657cd..e991c89d7a 100644 --- a/chrome/content/zotero/xpcom/schema.js +++ b/chrome/content/zotero/xpcom/schema.js @@ -2335,7 +2335,7 @@ Zotero.Schema = new function(){ for (var j=0, len=data.length; j