www

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

commit 204f9563c6bced5b5988549554c762004b157887
parent 7e5ec21781bcef898b0c086416d24a88e0fa701a
Author: Dan Stillman <dstillman@zotero.org>
Date:   Thu,  5 Jan 2012 19:05:50 -0500

Fix global flag on Zotero.Prefs.get()

Diffstat:
Mchrome/content/zotero/xpcom/zotero.js | 19++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js @@ -1926,19 +1926,20 @@ Zotero.Prefs = new function(){ try { if (global) { var service = Components.classes["@mozilla.org/preferences-service;1"] - .getService(Components.interfaces.nsIPrefService); + .getService(Components.interfaces.nsIPrefService); + var branch = service.getBranch(""); } else { - var service = this.prefBranch; + var branch = this.prefBranch; } - switch (this.prefBranch.getPrefType(pref)){ - case this.prefBranch.PREF_BOOL: - return this.prefBranch.getBoolPref(pref); - case this.prefBranch.PREF_STRING: - return this.prefBranch.getCharPref(pref); - case this.prefBranch.PREF_INT: - return this.prefBranch.getIntPref(pref); + switch (branch.getPrefType(pref)){ + case branch.PREF_BOOL: + return branch.getBoolPref(pref); + case branch.PREF_STRING: + return branch.getCharPref(pref); + case branch.PREF_INT: + return branch.getIntPref(pref); } } catch (e){