From 0f99df52d5309158c7b916581c5a79496b1844db Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Sun, 30 Jul 2017 07:44:13 +0200 Subject: Exclude Update stuff from about:support if the updater isn't built. --- toolkit/content/aboutSupport.js | 19 ++++++++++--------- toolkit/content/aboutSupport.xhtml | 2 ++ toolkit/mozapps/update/content/history.js | 2 +- 3 files changed, 13 insertions(+), 10 deletions(-) (limited to 'toolkit') diff --git a/toolkit/content/aboutSupport.js b/toolkit/content/aboutSupport.js index 95cadfbe7..5daf6d189 100644 --- a/toolkit/content/aboutSupport.js +++ b/toolkit/content/aboutSupport.js @@ -968,31 +968,32 @@ function safeModeRestart() { * Set up event listeners for buttons. */ function setupEventListeners() { - $("show-update-history-button").addEventListener("click", function (event) { +#ifdef MOZ_UPDATER + $("show-update-history-button").addEventListener("click", function(event) { var prompter = Cc["@mozilla.org/updates/update-prompt;1"].createInstance(Ci.nsIUpdatePrompt); prompter.showUpdateHistory(window); }); - $("reset-box-button").addEventListener("click", function (event) { +#endif + $("reset-box-button").addEventListener("click", function(event) { ResetProfile.openConfirmationDialog(window); }); - $("copy-raw-data-to-clipboard").addEventListener("click", function (event) { + $("copy-raw-data-to-clipboard").addEventListener("click", function(event) { copyRawDataToClipboard(this); }); - $("copy-to-clipboard").addEventListener("click", function (event) { + $("copy-to-clipboard").addEventListener("click", function(event) { copyContentsToClipboard(); }); - $("profile-dir-button").addEventListener("click", function (event) { + $("profile-dir-button").addEventListener("click", function(event) { openProfileDirectory(); }); - $("restart-in-safe-mode-button").addEventListener("click", function (event) { + $("restart-in-safe-mode-button").addEventListener("click", function(event) { if (Services.obs.enumerateObservers("restart-in-safe-mode").hasMoreElements()) { Services.obs.notifyObservers(null, "restart-in-safe-mode", ""); - } - else { + } else { safeModeRestart(); } }); - $("verify-place-integrity-button").addEventListener("click", function (event) { + $("verify-place-integrity-button").addEventListener("click", function(event) { PlacesDBUtils.checkAndFixDatabase(function(aLog) { let msg = aLog.join("\n"); $("verify-place-result").style.display = "block"; diff --git a/toolkit/content/aboutSupport.xhtml b/toolkit/content/aboutSupport.xhtml index f5939a6eb..e2885c8b8 100644 --- a/toolkit/content/aboutSupport.xhtml +++ b/toolkit/content/aboutSupport.xhtml @@ -99,6 +99,7 @@ #ifndef ANDROID +#ifdef MOZ_UPDATER &aboutSupport.appBasicsUpdateHistory; @@ -111,6 +112,7 @@ #endif +#endif #ifdef MOZ_UPDATER diff --git a/toolkit/mozapps/update/content/history.js b/toolkit/mozapps/update/content/history.js index 32a098de5..c5bbccefc 100644 --- a/toolkit/mozapps/update/content/history.js +++ b/toolkit/mozapps/update/content/history.js @@ -37,7 +37,7 @@ var gUpdateHistory = { var element = document.createElementNS(NS_XUL, "update"); this._view.appendChild(element); element.name = bundle.getFormattedString("updateFullName", - [update.name, update.buildID]); + [update.name, (update.buildID ? update.buildID : "-")]); element.type = bundle.getString("updateType_" + update.type); element.installDate = this._formatDate(update.installDate); if (update.detailsURL) -- cgit v1.2.3