From 66e121a4ed67f4a9dfdf44c7d9dc91022b4c6087 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 3 Jun 2011 07:46:27 +0000 Subject: [PATCH] - Reset debug output logging "Enable after restart" to false after a restart - Disable debug output logging after submitting to Zotero server --- chrome/content/zotero/preferences/preferences.js | 13 +++++++++---- chrome/content/zotero/xpcom/debug.js | 3 +++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/preferences/preferences.js b/chrome/content/zotero/preferences/preferences.js index 5e71b46b3..a4f68fb3c 100644 --- a/chrome/content/zotero/preferences/preferences.js +++ b/chrome/content/zotero/preferences/preferences.js @@ -1295,9 +1295,13 @@ Zotero_Preferences.Debug_Output = { toggleStore: function () { - var storing = Zotero.Debug.storing; - Zotero.Debug.setStore(!storing); - if (!storing) { + this.setStore(!Zotero.Debug.storing); + }, + + + setStore: function (set) { + Zotero.Debug.setStore(set); + if (set) { this._initTimer(); } else { @@ -1336,6 +1340,7 @@ Zotero_Preferences.Debug_Output = { var url = "http://www.zotero.org/repo/report?debug=1"; var output = Zotero.Debug.get(); + Zotero_Preferences.Debug_Output.setStore(false); var uploadCallback = function (xmlhttp) { document.getElementById('debug-output-submit').disabled = false; @@ -1367,7 +1372,7 @@ Zotero_Preferences.Debug_Output = { var reportID = reported[0].getAttribute('reportID'); ps.alert( null, - "Submitted", + "Debug Output Submitted", "Debug output has been sent to the Zotero server.\n\n" + "The Debug ID is D" + reportID + "." ); diff --git a/chrome/content/zotero/xpcom/debug.js b/chrome/content/zotero/xpcom/debug.js index dacbd8dce..39a474ad2 100644 --- a/chrome/content/zotero/xpcom/debug.js +++ b/chrome/content/zotero/xpcom/debug.js @@ -39,6 +39,9 @@ Zotero.Debug = new function () { this.init = function () { _console = Zotero.Prefs.get('debug.log'); _store = Zotero.Prefs.get('debug.store'); + if (_store) { + Zotero.Prefs.set('debug.store', false); + } _level = Zotero.Prefs.get('debug.level'); _time = Zotero.Prefs.get('debug.time'); }