diff options
author | Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org> | 2006-03-28 09:29:23 +0000 |
---|---|---|
committer | Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org> | 2006-03-28 09:29:23 +0000 |
commit | cb49e19e9ed2e90a4ece7a5479a4f6e3d342925f (patch) | |
tree | 8bc6c50a09b84c4232fb2c8eafff42c25d5d8da7 /misc | |
parent | a76ee6c9ed66e61211bb05bfe9dd6229918557af (diff) | |
download | drupal-cb49e19e9ed2e90a4ece7a5479a4f6e3d342925f.tar.gz drupal-cb49e19e9ed2e90a4ece7a5479a4f6e3d342925f.zip |
#54003, Watchdog not logging update errors, patch by Steven
Diffstat (limited to 'misc')
-rw-r--r-- | misc/progress.js | 2 | ||||
-rw-r--r-- | misc/update.js | 12 |
2 files changed, 10 insertions, 4 deletions
diff --git a/misc/progress.js b/misc/progress.js index cc029e5b5ac..b519f066b57 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 1dbfdb10ecf..9177296a112 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); |