diff --git a/chrome/content/zotero/preferences/preferences_search.js b/chrome/content/zotero/preferences/preferences_search.js index 711a06568..6b3b56631 100644 --- a/chrome/content/zotero/preferences/preferences_search.js +++ b/chrome/content/zotero/preferences/preferences_search.js @@ -447,8 +447,8 @@ Zotero_Preferences.Search = { var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]. createInstance(Components.interfaces.nsIPromptService); var buttonFlags = (ps.BUTTON_POS_0) * (ps.BUTTON_TITLE_IS_STRING) - + (ps.BUTTON_POS_1) * (ps.BUTTON_TITLE_IS_STRING) - + (ps.BUTTON_POS_2) * (ps.BUTTON_TITLE_CANCEL); + + (ps.BUTTON_POS_1) * (ps.BUTTON_TITLE_CANCEL) + + (ps.BUTTON_POS_2) * (ps.BUTTON_TITLE_IS_STRING); var index = ps.confirmEx(null, Zotero.getString('zotero.preferences.search.rebuildIndex'), @@ -456,13 +456,15 @@ Zotero_Preferences.Search = { Zotero.getString('zotero.preferences.search.indexUnindexed')), buttonFlags, Zotero.getString('zotero.preferences.search.rebuildIndex'), + null, + // Position 2 because of https://bugzilla.mozilla.org/show_bug.cgi?id=345067 Zotero.getString('zotero.preferences.search.indexUnindexed'), - null, null, {}); + null, {}); if (index == 0) { Zotero.Fulltext.rebuildIndex(); } - else if (index == 1) { + else if (index == 2) { Zotero.Fulltext.rebuildIndex(true) } @@ -474,8 +476,8 @@ Zotero_Preferences.Search = { var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]. createInstance(Components.interfaces.nsIPromptService); var buttonFlags = (ps.BUTTON_POS_0) * (ps.BUTTON_TITLE_IS_STRING) - + (ps.BUTTON_POS_1) * (ps.BUTTON_TITLE_IS_STRING) - + (ps.BUTTON_POS_2) * (ps.BUTTON_TITLE_CANCEL); + + (ps.BUTTON_POS_1) * (ps.BUTTON_TITLE_CANCEL) + + (ps.BUTTON_POS_2) * (ps.BUTTON_TITLE_IS_STRING); var index = ps.confirmEx(null, Zotero.getString('zotero.preferences.search.clearIndex'), @@ -483,13 +485,14 @@ Zotero_Preferences.Search = { Zotero.getString('zotero.preferences.search.clearNonLinkedURLs')), buttonFlags, Zotero.getString('zotero.preferences.search.clearIndex'), - Zotero.getString('zotero.preferences.search.clearNonLinkedURLs'), - null, null, {}); + null, + // Position 2 because of https://bugzilla.mozilla.org/show_bug.cgi?id=345067 + Zotero.getString('zotero.preferences.search.clearNonLinkedURLs'), null, {}); if (index == 0) { Zotero.Fulltext.clearIndex(); } - else if (index == 1) { + else if (index == 2) { Zotero.Fulltext.clearIndex(true); }