From 6c536fc784dbf0aedc4b491276d8605dd945bf50 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 19 Jul 2015 17:09:03 -0400 Subject: [PATCH] Don't create Quick Start Guide item for new libraries The default items cause problems with conflict resolution for existing users (and not syncing them or ignoring conflicts for them is kind of weird), and they require remote changes for new databases. I do like there not being a completely empty library, but I think it's probably better just to display a virtual welcome message with a link to the Quick Start Guide somewhere else, such as in the right-hand pane. (A new installation also opens the start page on zotero.org.) --- chrome/content/zotero/xpcom/schema.js | 4 ++-- test/tests/supportTest.js | 8 +------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js index c4c580f6d4..561d402a44 100644 --- a/chrome/content/zotero/xpcom/schema.js +++ b/chrome/content/zotero/xpcom/schema.js @@ -1475,7 +1475,7 @@ Zotero.Schema = new function(){ + "(4, 'publications', 1, 1)" yield Zotero.DB.queryAsync(sql, userLibraryID); - if (!Zotero.Schema.skipDefaultData) { + /*if (!Zotero.Schema.skipDefaultData) { // Quick Start Guide web page item var sql = "INSERT INTO items VALUES(1, 13, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, ?, 'ABCD2345', 0, 0)"; yield Zotero.DB.queryAsync(sql, userLibraryID); @@ -1503,7 +1503,7 @@ Zotero.Schema = new function(){ + '

' + Zotero.getString('install.quickStartGuide.message.thanks') + '

'; var sql = "INSERT INTO itemNotes VALUES (2, 1, ?, ?)"; yield Zotero.DB.queryAsync(sql, [welcomeMsg, welcomeTitle]); - } + }*/ self.dbInitialized = true; }) diff --git a/test/tests/supportTest.js b/test/tests/supportTest.js index aea221828d..5a8d424670 100644 --- a/test/tests/supportTest.js +++ b/test/tests/supportTest.js @@ -2,14 +2,8 @@ describe("Support Functions for Unit Testing", function() { describe("resetDB", function() { it("should restore the DB to factory settings", function* () { this.timeout(60000); - // Quick Start Guide - yield Zotero.Items.erase(1); - assert.isFalse(yield Zotero.Items.getAsync(1)); yield resetDB(); - var item = yield Zotero.Items.getAsync(1); - assert.isObject(item); - yield item.loadItemData(); - assert.equal(item.getField("url"), "https://www.zotero.org/support/quick_start_guide"); + assert.equal((yield Zotero.DB.valueQueryAsync("SELECT COUNT(*) FROM items")), 0); }); }); describe("loadSampleData", function() {