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;

View file

@ -696,7 +696,7 @@ function ChromeExtensionHandler() {
default:
type = 'library';
var s = new Zotero.Search();
s.addCondition('libraryID', 'is', id ? id : null);
s.addCondition('libraryID', 'is', id ? id : 0);
s.addCondition('noChildren', 'true');
var ids = s.search();
var results = Zotero.Items.get(ids);

View file

@ -61,6 +61,7 @@ const xpcomFilesLocal = [
'cookieSandbox',
'data_access',
'data/dataObjects',
'data/dataObjectUtilities',
'data/cachedTypes',
'data/item',
'data/items',