Update code to use 0 instead of NULL for libraryID

This commit is contained in:
Dan Stillman 2014-08-06 17:38:04 -04:00
parent 368e568fe1
commit 4ea5e2d426
28 changed files with 213 additions and 313 deletions

View file

@ -156,13 +156,8 @@ ZoteroAutoComplete.prototype.startSearch = function(searchString, searchParams,
fromSQL += ")";
}
if (typeof searchParams.libraryID != 'undefined') {
if (searchParams.libraryID) {
fromSQL += " AND libraryID=?";
sqlParams.push(searchParams.libraryID);
}
else {
fromSQL += " AND libraryID IS NULL";
}
fromSQL += " AND libraryID=?";
sqlParams.push(searchParams.libraryID);
}
sql += fromSQL;