Example #1
0
 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();
 }
Example #2
0
 /**
  * Remove temp files for upgrader
  */
 public function removeTempFiles()
 {
     parent::removeTempFiles();
     $this->removeDir($this->cacheDir("upgrades/driver/"));
 }
Example #3
0
 /**
  * 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);
 }