mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-11-10 17:13:38 +08:00
[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.
This commit is contained in:
parent
8608c18bbe
commit
691300da51
1 changed files with 5 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue