diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js index 21f7e879a..2e73a039d 100644 --- a/chrome/content/zotero/overlay.js +++ b/chrome/content/zotero/overlay.js @@ -182,7 +182,9 @@ var ZoteroPane = new function() // they the DB is initialized erroneously (e.g. while switching data // directory locations) if (Zotero.Schema.dbInitialized && Zotero.Prefs.get('firstRun')) { - gBrowser.selectedTab = gBrowser.addTab('http://www.zotero.org/documentation/quick_start_guide'); + setTimeout(function () { + gBrowser.selectedTab = gBrowser.addTab('http://www.zotero.org/documentation/quick_start_guide'); + }, 400); Zotero.Prefs.set('extensions.zotero.firstRun', false); } } diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js index 29bfb8281..631ee0824 100644 --- a/chrome/content/zotero/xpcom/schema.js +++ b/chrome/content/zotero/xpcom/schema.js @@ -36,7 +36,7 @@ Zotero.Schema = new function(){ var _repositoryTimer; var _remoteUpdateInProgress = false; - var _fulltextItemWordsCache = []; + var _fulltextItemWordsCache = null; var self = this; @@ -151,6 +151,10 @@ Zotero.Schema = new function(){ } insertStatement.reset(); Zotero.DB.commitTransaction(); + + Zotero.DB.beginTransaction(); + Zotero.DB.query("INSERT INTO fulltextItems SELECT DISTINCT itemID, 1, NULL, NULL, NULL, NULL FROM fulltextItemWords"); + Zotero.DB.commitTransaction(); } catch (e) { Zotero.debug(e); @@ -1164,7 +1168,6 @@ Zotero.Schema = new function(){ Zotero.DB.query("DROP TABLE fulltextItems"); Zotero.DB.query("CREATE TABLE fulltextItems (\n itemID INT,\n version INT,\n PRIMARY KEY (itemID),\n FOREIGN KEY (itemID) REFERENCES items(itemID)\n);"); - Zotero.DB.query("INSERT INTO fulltextItems SELECT DISTINCT itemID, 1 FROM fulltextItemWords"); } if (i==36) {