From 3aae8d3f897e1876e6274859074f43e9892ef4aa Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 6 Jun 2006 19:06:40 +0000 Subject: [PATCH] Fix Scholar.getItems() to not trigger an SQL query for every item --- .../content/scholar/xpcom/data_access.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/chrome/chromeFiles/content/scholar/xpcom/data_access.js b/chrome/chromeFiles/content/scholar/xpcom/data_access.js index cc79c8f9bf..cdb23040c2 100644 --- a/chrome/chromeFiles/content/scholar/xpcom/data_access.js +++ b/chrome/chromeFiles/content/scholar/xpcom/data_access.js @@ -802,6 +802,7 @@ Scholar.Items = new function(){ var loaded = new Array(); if (!arguments[0]){ + Scholar.debug('No arguments provided to Items.get()'); return false; } @@ -820,7 +821,7 @@ Scholar.Items = new function(){ } // If single id, return the object directly - if (arguments[0] && typeof arguments[0]!='Object' + if (arguments[0] && typeof arguments[0]!='object' && typeof arguments[1]=='undefined'){ return _items[arguments[0]]; } @@ -829,7 +830,7 @@ Scholar.Items = new function(){ for (i=0; i