www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 27f348c7afc5d26bd3efa4946bd3a54eb044bf43
parent cfc1b56ca6eab5c8b2634a57b962869a9f32a300
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue,  4 Oct 2016 01:15:16 -0400

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

Diffstat:
Mchrome/content/zotero/xpcom/data/library.js | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/chrome/content/zotero/xpcom/data/library.js b/chrome/content/zotero/xpcom/data/library.js @@ -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)); });