Fix error calling Zotero.Items.getAll() without true as first argument

This commit is contained in:
Dan Stillman 2007-11-09 19:37:42 +00:00
parent 79809eff9c
commit 1f9580b94a

View File

@ -2675,9 +2675,9 @@ Zotero.Items = new function(){
* If |onlyTopLevel|, don't include child items
*/
function getAll(onlyTopLevel) {
var sql = 'SELECT A.itemID FROM items';
var sql = 'SELECT A.itemID FROM items A';
if (onlyTopLevel) {
sql += ' A LEFT JOIN itemNotes B USING (itemID) '
sql += ' LEFT JOIN itemNotes B USING (itemID) '
+ 'LEFT JOIN itemAttachments C ON (C.itemID=A.itemID) '
+ 'WHERE B.sourceItemID IS NULL AND C.sourceItemID IS NULL';
}