Don't return non-independent file items in Scholar.getItems() (thanks David)
This commit is contained in:
parent
c093e7b62b
commit
441696767a
1 changed files with 3 additions and 2 deletions
|
@ -3273,8 +3273,9 @@ Scholar.getItems = function(parent){
|
|||
var toReturn = new Array();
|
||||
|
||||
if (!parent){
|
||||
var sql = "SELECT itemID FROM items LEFT JOIN itemNotes USING (itemID) "
|
||||
+ "WHERE sourceItemID IS NULL";
|
||||
var sql = "SELECT A.itemID FROM items A LEFT JOIN itemNotes B USING (itemID) "
|
||||
+ "LEFT JOIN itemFiles C ON (C.itemID=A.itemID) WHERE B.sourceItemID IS NULL"
|
||||
+ " AND C.sourceItemID IS NULL";
|
||||
}
|
||||
else {
|
||||
var sql = 'SELECT itemID FROM collectionItems '
|
||||
|
|
Loading…
Reference in a new issue