Skip to content

Commit

Permalink
Update commands with new 2.x methods
Browse files Browse the repository at this point in the history
  • Loading branch information
uberhacker committed Feb 23, 2019
1 parent 12275e1 commit 2e18738
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Commands/CreateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public function create($options = ['env' => null, 'element' => null, 'framework'
$env->getBackups()->create($options);
$message = 'Creating a backup of the {element} for {site_env}.';
} else {
$env->getBackups()->create($options)->wait();
$env->getBackups()->create($options)->checkProgress();
$message = 'Created a backup of the {element} for {site_env}.';
}
$this->log()->notice($message, [
Expand Down
8 changes: 4 additions & 4 deletions src/Commands/GetCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class GetCommand extends TerminusCommand implements SiteAwareInterface
*
* @usage terminus backup-all:get
* Displays the URL for the most recent files backup of all site environments.
* @usage terminus backup-all:get --element=code
* @usage terminus backup-all:get --element=<code|files|database|db>
* Displays the URL for the most recent code backup of all site environments.
* @usage terminus backup-all:get --framework=<backdrop|drupal|drupal8|wordpress>
* Displays the URL for the most recent files backups of specific frameworks only in all site environments.
Expand Down Expand Up @@ -100,7 +100,7 @@ public function getBackup(array $options = ['env' => null, 'element' => null, 'f
$fw = $site['framework'];
if ($environments = $this->getSite($site['name'])->getEnvironments()->serialize()) {
foreach ($environments as $environment) {
if ($environment['initialized'] == 'true') {
if ($environment['initialized']) {
$show = !isset($options['env']) ? true : ($environment['id'] == $options['env']);
if ($show && !empty($framework) && !in_array($fw, $framework)) {
$show = false;
Expand Down Expand Up @@ -139,14 +139,14 @@ public function getBackup(array $options = ['env' => null, 'element' => null, 'f
$backup_date = date('Y-m-d', $backup->getDate());
if ($backup_date >= $lower and $backup_date <= $upper) {
$rows[] = [
'url' => $backup->getUrl(),
'url' => $backup->getArchiveURL(),
];
}
}
} else {
$backup = array_shift($backups);
$rows[] = [
'url' => $backup->getUrl(),
'url' => $backup->getArchiveURL(),
];
}
}
Expand Down

0 comments on commit 2e18738

Please sign in to comment.