mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-10 06:58:27 +03:00
Return detailed info on PgpImportKey
This commit is contained in:
parent
7bc302c665
commit
6f98aee998
1 changed files with 3 additions and 7 deletions
|
|
@ -221,15 +221,11 @@ trait Pgp
|
|||
}
|
||||
}
|
||||
|
||||
$result = false;
|
||||
$result = [];
|
||||
if ($sKey) {
|
||||
$sKey = \trim($sKey);
|
||||
if ($this->GetActionParam('backup', '')) {
|
||||
$result = $result || Backup::PGPKey($sKey);
|
||||
}
|
||||
if ($this->GetActionParam('gnuPG', '') && ($GPG = $this->GnuPG())) {
|
||||
$result = $result || $GPG->import($sKey);
|
||||
}
|
||||
$result['backup'] = $this->GetActionParam('backup', '') && Backup::PGPKey($sKey);
|
||||
$result['gnuPG'] = $this->GetActionParam('gnuPG', '') && ($GPG = $this->GnuPG()) && $GPG->import($sKey);
|
||||
}
|
||||
|
||||
return $this->DefaultResponse($result);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue