2005-12-06 09:25:22 +00:00
|
|
|
if (isJsEnabled()) {
|
|
|
|
addLoadEvent(function() {
|
|
|
|
if ($('edit-has_js')) {
|
|
|
|
$('edit-has_js').value = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($('progress')) {
|
2005-12-21 23:44:08 +00:00
|
|
|
updateCallback = function (progress, status, pb) {
|
2005-12-06 09:25:22 +00:00
|
|
|
if (progress == 100) {
|
2005-12-21 23:44:08 +00:00
|
|
|
pb.stopMonitoring();
|
2005-12-06 09:25:22 +00:00
|
|
|
window.location = window.location.href.split('op=')[0] +'op=finished';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-12-21 23:44:08 +00:00
|
|
|
var progress = new progressBar('updateprogress', updateCallback, HTTPPost);
|
|
|
|
progress.setProgress(-1, 'Starting updates...');
|
|
|
|
$('progress').appendChild(progress.element);
|
|
|
|
progress.startMonitoring('update.php?op=do_update', 0);
|
2005-12-06 09:25:22 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|