From 6f98aee998fef5c8861b9e005e8615fd62a2ab52 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Mon, 26 Feb 2024 18:26:51 +0100 Subject: [PATCH] Return detailed info on PgpImportKey --- .../v/0.0.0/app/libraries/RainLoop/Actions/Pgp.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Pgp.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Pgp.php index ea819cd17..768855c19 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Pgp.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Pgp.php @@ -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);