summaryrefslogtreecommitdiff
path: root/misc/update.js
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2005-12-21 23:44:08 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2005-12-21 23:44:08 +0000
commit69bcdef53139e4952bfd2e027ee85c720a836e35 (patch)
tree0766d4e158e66831fae6d9abc03fde5fb809d703 /misc/update.js
parentc60e7acdd4c53553a7dda287151399743dc6d682 (diff)
downloadbrdo-69bcdef53139e4952bfd2e027ee85c720a836e35.tar.gz
brdo-69bcdef53139e4952bfd2e027ee85c720a836e35.tar.bz2
- JS Updater: stop monitoring progress when 100% is reached (can lead to infinite refresh loops in Safari)
Diffstat (limited to 'misc/update.js')
-rw-r--r--misc/update.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/misc/update.js b/misc/update.js
index e4358d269..117713b69 100644
--- a/misc/update.js
+++ b/misc/update.js
@@ -5,16 +5,17 @@ if (isJsEnabled()) {
}
if ($('progress')) {
- updateCallback = function (progress, status) {
+ updateCallback = function (progress, status, pb) {
if (progress == 100) {
+ pb.stopMonitoring();
window.location = window.location.href.split('op=')[0] +'op=finished';
}
}
- this.progress = new progressBar('updateprogress', updateCallback, HTTPPost);
- this.progress.setProgress(-1, 'Starting updates...');
- $('progress').appendChild(this.progress.element);
- this.progress.startMonitoring('update.php?op=do_update', 0);
+ var progress = new progressBar('updateprogress', updateCallback, HTTPPost);
+ progress.setProgress(-1, 'Starting updates...');
+ $('progress').appendChild(progress.element);
+ progress.startMonitoring('update.php?op=do_update', 0);
}
});
}