diff --git a/chrome/chromeFiles/content/scholar/xpcom/data_access.js b/chrome/chromeFiles/content/scholar/xpcom/data_access.js index 42a5a29ce..79c39091e 100644 --- a/chrome/chromeFiles/content/scholar/xpcom/data_access.js +++ b/chrome/chromeFiles/content/scholar/xpcom/data_access.js @@ -2642,8 +2642,22 @@ Scholar.Collection.prototype.getDescendents = function(nested, type){ + ' UNION SELECT itemID AS id, 1 AS type, NULL AS collectionName ' + 'FROM collectionItems WHERE collectionID=' + this._id); + if (type){ + switch (type){ + case 'item': + case 'collection': + break; + default: + throw ("Invalid type '" + type + "' in Collection.getDescendents()"); + } + } + for(var i=0, len=children.length; i