www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 40b3ecc996d232efba51a0ee98ee91c6970fe8ba
parent b7124bd8c19b86a45883efa511856f613a9cdb2d
Author: Dan Stillman <dstillman@zotero.org>
Date:   Thu,  6 Jul 2006 13:06:32 +0000

Addresses #87, Add fromArray() and toArray() methods to Item objects

Item.getTags() (which toArray() uses) now returns actual tags rather than ids -- separate method getTagIDs to return ids


Diffstat:
Mchrome/chromeFiles/content/scholar/xpcom/data_access.js | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/chrome/chromeFiles/content/scholar/xpcom/data_access.js b/chrome/chromeFiles/content/scholar/xpcom/data_access.js @@ -971,6 +971,12 @@ Scholar.Item.prototype.addTag = function(tag){ } Scholar.Item.prototype.getTags = function(){ + var sql = "SELECT tag FROM tags WHERE tagID IN " + + "(SELECT tagID FROM itemTags WHERE itemID=" + this.getID() + ")"; + return Scholar.DB.columnQuery(sql); +} + +Scholar.Item.prototype.getTagIDs = function(){ var sql = "SELECT tagID FROM itemTags WHERE itemID=" + this.getID(); return Scholar.DB.columnQuery(sql); }