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.)
This commit is contained in:
parent
d868f007e9
commit
6c536fc784
|
@ -1475,7 +1475,7 @@ Zotero.Schema = new function(){
|
||||||
+ "(4, 'publications', 1, 1)"
|
+ "(4, 'publications', 1, 1)"
|
||||||
yield Zotero.DB.queryAsync(sql, userLibraryID);
|
yield Zotero.DB.queryAsync(sql, userLibraryID);
|
||||||
|
|
||||||
if (!Zotero.Schema.skipDefaultData) {
|
/*if (!Zotero.Schema.skipDefaultData) {
|
||||||
// Quick Start Guide web page item
|
// Quick Start Guide web page item
|
||||||
var sql = "INSERT INTO items VALUES(1, 13, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, ?, 'ABCD2345', 0, 0)";
|
var sql = "INSERT INTO items VALUES(1, 13, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, ?, 'ABCD2345', 0, 0)";
|
||||||
yield Zotero.DB.queryAsync(sql, userLibraryID);
|
yield Zotero.DB.queryAsync(sql, userLibraryID);
|
||||||
|
@ -1503,7 +1503,7 @@ Zotero.Schema = new function(){
|
||||||
+ '<p>' + Zotero.getString('install.quickStartGuide.message.thanks') + '</p></div>';
|
+ '<p>' + Zotero.getString('install.quickStartGuide.message.thanks') + '</p></div>';
|
||||||
var sql = "INSERT INTO itemNotes VALUES (2, 1, ?, ?)";
|
var sql = "INSERT INTO itemNotes VALUES (2, 1, ?, ?)";
|
||||||
yield Zotero.DB.queryAsync(sql, [welcomeMsg, welcomeTitle]);
|
yield Zotero.DB.queryAsync(sql, [welcomeMsg, welcomeTitle]);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
self.dbInitialized = true;
|
self.dbInitialized = true;
|
||||||
})
|
})
|
||||||
|
|
|
@ -2,14 +2,8 @@ describe("Support Functions for Unit Testing", function() {
|
||||||
describe("resetDB", function() {
|
describe("resetDB", function() {
|
||||||
it("should restore the DB to factory settings", function* () {
|
it("should restore the DB to factory settings", function* () {
|
||||||
this.timeout(60000);
|
this.timeout(60000);
|
||||||
// Quick Start Guide
|
|
||||||
yield Zotero.Items.erase(1);
|
|
||||||
assert.isFalse(yield Zotero.Items.getAsync(1));
|
|
||||||
yield resetDB();
|
yield resetDB();
|
||||||
var item = yield Zotero.Items.getAsync(1);
|
assert.equal((yield Zotero.DB.valueQueryAsync("SELECT COUNT(*) FROM items")), 0);
|
||||||
assert.isObject(item);
|
|
||||||
yield item.loadItemData();
|
|
||||||
assert.equal(item.getField("url"), "https://www.zotero.org/support/quick_start_guide");
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
describe("loadSampleData", function() {
|
describe("loadSampleData", function() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user