From 163b0b733e6fb2c735f513368069498c2312a9d7 Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Wed, 23 Jun 2010 16:23:01 +0200 Subject: Docs and namespace for preferences - the first attempt (just a copy) of documentation - put all preferences into names (bugzilla-triage.setting.) --- lib/bzpage.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/bzpage.js b/lib/bzpage.js index 8061577..1a43191 100644 --- a/lib/bzpage.js +++ b/lib/bzpage.js @@ -11,6 +11,7 @@ var Color = require("color").Color; var TriagedDistro = 13; var NumberOfFrames = 7; var bugURL = "https://bugzilla.redhat.com/show_bug.cgi?id="; +var BSTPrefNS = "bugzilla-triage.setting."; // ==================================================================================== // BZPage's methods @@ -627,12 +628,13 @@ BZPage.prototype.getAttachments = function getAttachments () { * @return String with the password */ BZPage.prototype.getPassword = function getPassword () { - if (preferences.isSet("BZpassword")) { - return preferences.get("BZpassword",undefined); + var prefName = BSTPrefNS+"BZpassword"; + if (preferences.isSet(prefName)) { + return preferences.get(prefName,undefined); } else { var passwordText = util.getPassword(); if (passwordText) { - preferences.set("BZpassword", passwordText); + preferences.set(prefName, passwordText); } } }; -- cgit