summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorGerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org>2006-03-28 09:29:23 +0000
committerGerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org>2006-03-28 09:29:23 +0000
commitcb49e19e9ed2e90a4ece7a5479a4f6e3d342925f (patch)
tree8bc6c50a09b84c4232fb2c8eafff42c25d5d8da7 /misc
parenta76ee6c9ed66e61211bb05bfe9dd6229918557af (diff)
downloadbrdo-cb49e19e9ed2e90a4ece7a5479a4f6e3d342925f.tar.gz
brdo-cb49e19e9ed2e90a4ece7a5479a4f6e3d342925f.tar.bz2
#54003, Watchdog not logging update errors, patch by Steven
Diffstat (limited to 'misc')
-rw-r--r--misc/progress.js2
-rw-r--r--misc/update.js12
2 files changed, 10 insertions, 4 deletions
diff --git a/misc/progress.js b/misc/progress.js
index cc029e5b5..b519f066b 100644
--- a/misc/progress.js
+++ b/misc/progress.js
@@ -107,7 +107,7 @@ progressBar.prototype.receivePing = function (string, xmlhttp, pb) {
progressBar.prototype.displayError = function (string) {
var error = document.createElement('div');
error.className = 'error';
- error.appendChild(document.createTextNode(string));
+ error.innerHTML = string;
this.element.style.display = 'none';
this.element.parentNode.insertBefore(error, this.element);
diff --git a/misc/update.js b/misc/update.js
index 1dbfdb10e..9177296a1 100644
--- a/misc/update.js
+++ b/misc/update.js
@@ -7,15 +7,21 @@ if (isJsEnabled()) {
}
if ($('progress')) {
- updateCallback = function (progress, status, pb) {
+ // Success: redirect to the summary.
+ var updateCallback = function (progress, status, pb) {
if (progress == 100) {
pb.stopMonitoring();
window.location = window.location.href.split('op=')[0] +'op=finished';
}
}
- errorCallback = function (pb) {
- window.location = window.location.href.split('op=')[0] +'op=error';
+ // Failure: point out error message and provide link to the summary.
+ var errorCallback = function (pb) {
+ var div = document.createElement('p');
+ div.className = 'error';
+ div.innerHTML = 'An unrecoverable error has occured. You can find the error message below. It is advised to copy it to the clipboard for reference. Please continue to the <a href="update.php?op=error">update summary</a>';
+ $('progress').insertBefore(div, $('progress').firstChild);
+ $('wait').style.display = 'none';
}
var progress = new progressBar('updateprogress', updateCallback, HTTPPost, errorCallback);