diff --git a/include/ajax.upgrader.php b/include/ajax.upgrader.php index 00e284e42384492da1133263dfd572c1215d03d8..331d23d26bef97b89eddbf2e80170947a794b72f 100644 --- a/include/ajax.upgrader.php +++ b/include/ajax.upgrader.php @@ -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; diff --git a/include/class.upgrader.php b/include/class.upgrader.php index 528850020868c8a2f11c14b3b252c18e20951afa..dc9aba33fce4209686018b333daa8526f1fa6249 100644 --- a/include/class.upgrader.php +++ b/include/class.upgrader.php @@ -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(); } }