Don't count Quick Start Guide items when checking for empty library

This commit is contained in:
Dan Stillman 2016-10-04 01:15:16 -04:00
parent cfc1b56ca6
commit 27f348c7af

View File

@ -649,6 +649,10 @@ Zotero.Library.prototype.hasItems = Zotero.Promise.coroutine(function* () {
throw new Error("Library is not saved yet");
}
let sql = 'SELECT COUNT(*)>0 FROM items WHERE libraryID=?';
// Don't count old <=4.0 Quick Start Guide items
if (this.libraryID == Zotero.Libraries.userLibraryID) {
sql += "AND key NOT IN ('ABCD2345', 'ABCD3456')";
}
return !!(yield Zotero.DB.valueQueryAsync(sql, this.libraryID));
});