From 691300da5156ba084eb591b418419f4a2831d3a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20H=C3=A4rdeman?= Date: Wed, 25 Aug 2021 17:23:57 +0200 Subject: [PATCH] [snappymail] Clean up exception descriptions in MailClient.php The messages are currently shown in the main UI as e.g.: Can't create folder. New folder name contains delimiter Including a period (which seems to be the preferred style in other source files) means that the error message would read: Can't create folder. New folder name contains delimiter. Also fix two typos. --- .../v/0.0.0/app/libraries/MailSo/Mail/MailClient.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Mail/MailClient.php b/snappymail/v/0.0.0/app/libraries/MailSo/Mail/MailClient.php index 0fe728c74..1ab0ee534 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Mail/MailClient.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Mail/MailClient.php @@ -2100,8 +2100,8 @@ class MailClient // TODO: Translate throw new \MailSo\Mail\Exceptions\RuntimeException( \strlen($sFolderParentFullNameRaw) - ? 'Cannot create folder in non-existen parent folder' - : 'Cannot get folder delimiter'); + ? 'Cannot create folder in non-existent parent folder.' + : 'Cannot get folder delimiter.'); } $sDelimiter = $aFolders[0]->Delimiter(); @@ -2119,7 +2119,7 @@ class MailClient { // TODO: Translate throw new \MailSo\Mail\Exceptions\RuntimeException( - 'New folder name contains delimiter'); + 'New folder name contains delimiter.'); } $sFullNameRawToCreate = $sFolderParentFullNameRaw.$sFullNameRawToCreate; @@ -2164,7 +2164,7 @@ class MailClient if (!$aFolders) { // TODO: Translate - throw new \MailSo\Mail\Exceptions\RuntimeException('Cannot '.($bRename?'rename':'move').' non-existen folder'); + throw new \MailSo\Mail\Exceptions\RuntimeException('Cannot '.($bRename?'rename':'move').' non-existent folder.'); } $sDelimiter = $aFolders[0]->Delimiter(); @@ -2189,7 +2189,7 @@ class MailClient if (\strlen($sDelimiter) && false !== \strpos($sNewFolderFullNameRaw, $sDelimiter)) { // TODO: Translate - throw new \MailSo\Mail\Exceptions\RuntimeException('New folder name contains delimiter'); + throw new \MailSo\Mail\Exceptions\RuntimeException('New folder name contains delimiter.'); } $sFolderParentFullNameRaw = false === $iLast ? '' : \substr($sPrevFolderFullNameRaw, 0, $iLast + 1);