public function __construct($admin) { $this->context = array("admin" => $admin->user_name, "log" => "cache/upgrade.log", "source_dir" => realpath(dirname(__FILE__) . "/../../"), 'new_source_dir' => realpath(dirname(__FILE__) . "/../../"), "zip" => "UNITTEST"); parent::__construct(); $this->init(); $this->start(); }
/** * Remove temp files for upgrader */ public function removeTempFiles() { parent::removeTempFiles(); $this->removeDir($this->cacheDir("upgrades/driver/")); }
/** * Run given stage * If stage healthcheck and healthcheck doesn't exists we run unpack stage * @inheritdoc */ public function run($stage) { if ($stage == 'healthcheck' && (!file_exists($this->context['health_check_path']) || empty($this->state['stage']['unpack']) || $this->state['stage']['unpack'] == 'failed') && !$this->run('unpack')) { return false; } return parent::run($stage); }