diff --git a/chrome/chromeFiles/content/scholar/xpcom/data_access.js b/chrome/chromeFiles/content/scholar/xpcom/data_access.js index 4b120330f7..160866c9bc 100644 --- a/chrome/chromeFiles/content/scholar/xpcom/data_access.js +++ b/chrome/chromeFiles/content/scholar/xpcom/data_access.js @@ -857,15 +857,11 @@ Scholar.Items = new function(){ /* - * Reloads all currently cached items + * Reloads all items */ function reloadAll(){ - var ids = new Array(); - for (itemID in _items){ - ids.push(itemID); - } - _load(ids); - return true; + _items = new Array(); + _load(); } @@ -908,10 +904,6 @@ Scholar.Items = new function(){ function _load(){ - if (!arguments){ - return false; - } - // Should be the same as query in Scholar.Item.loadFromID, just // without itemID clause var sql = 'SELECT I.*, lastName AS firstCreator ' @@ -920,7 +912,7 @@ Scholar.Items = new function(){ + 'LEFT JOIN creators C ON (IC.creatorID=C.creatorID) ' + 'WHERE (IC.orderIndex=0 OR IC.orderIndex IS NULL)'; - if (arguments[0]!='all'){ + if (arguments[0]){ sql += ' AND I.itemID IN (' + Scholar.join(arguments,',') + ')'; } @@ -928,9 +920,16 @@ Scholar.Items = new function(){ if (result){ for (var i=0,len=result.length; i