Skip to content
Snippets Groups Projects
Commit 9a721182 authored by Jared Hancock's avatar Jared Hancock
Browse files

Get the upgrader to actually work

parent b02778cd
No related branches found
No related tags found
No related merge requests found
......@@ -27,13 +27,6 @@ class UpgraderAjaxAPI extends AjaxController {
$upgrader = new Upgrader(TABLE_PREFIX, UPGRADE_DIR.'streams/');
//Just report the next action on the first call.
if(!$_SESSION['ost_upgrader'] || !$_SESSION['ost_upgrader'][$upgrader->getShash()]['progress']) {
$_SESSION['ost_upgrader'][$upgrader->getShash()]['progress'] = $upgrader->getNextAction();
Http::response(200, $upgrader->getNextAction());
exit;
}
if($upgrader->isAborted()) {
Http::response(416, "We have a problem ... wait a sec.");
exit;
......
......@@ -98,7 +98,8 @@ class Upgrader {
}
function getNumPendingTasks() {
return $this->getCurrentStream()->getNumPendingTasks();
if ($this->getCurrentStream())
return $this->getCurrentStream()->getNumPendingTasks();
}
function doTasks() {
......@@ -125,7 +126,8 @@ class Upgrader {
}
function getSHash() {
return $this->getCurrentStream()->getSHash();
if ($this->getCurrentStream())
return $this->getCurrentStream()->getSHash();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment