Skip to content

Commit

Permalink
Remove user data from all apps; improve messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Sep 25, 2017
1 parent 47261d9 commit df1a143
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions horde/lib/Cli/Backup.php
Expand Up @@ -197,23 +197,23 @@ protected function _restore($dir, $apps, $users, $clear)
}
$resolved[] = $type;
$user = $collection->getUser();
if ($clear && !isset($cleared[$user])) {
if ($clear && !isset($cleared[$user][$app])) {
try {
$this->_registry->removeUserData($user, $app);
$this->message(
sprintf(_("Removed user data from %s."), $type),
sprintf(_("Removed user data from %s."), $app),
'cli.success'
);
} catch (Horde_Exception $e) {
$this->message($e->getMessage(), 'cli.warning');
}
$cleared[$user] = true;
$cleared[$user][$app] = true;
}
$count = $this->_registry->callAppMethod(
$app, 'restore', array('args' => array($collection))
);
$this->message(
sprintf(_("Restored %d items from %s."), $count, $type),
sprintf(_("Restored %d items from %s %s."), $count, $app, $type),
'cli.success'
);
}
Expand Down

0 comments on commit df1a143

Please sign in to comment.