commit 66e121a4ed67f4a9dfdf44c7d9dc91022b4c6087
parent d7e4ae36209ab1e362754f2253feca06d98781fb
Author: Dan Stillman <dstillman@zotero.org>
Date: Fri, 3 Jun 2011 07:46:27 +0000
- Reset debug output logging "Enable after restart" to false after a restart
- Disable debug output logging after submitting to Zotero server
Diffstat:
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git 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
@@ -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');
}