mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Bugfix: ClientException #1706
This commit is contained in:
parent
16cc17af00
commit
5056ecf493
1 changed files with 4 additions and 2 deletions
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
namespace RainLoop\Providers;
|
namespace RainLoop\Providers;
|
||||||
|
|
||||||
|
use RainLoop\Exceptions\ClientException;
|
||||||
|
|
||||||
class Domain extends AbstractProvider
|
class Domain extends AbstractProvider
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
@ -35,7 +37,7 @@ class Domain extends AbstractProvider
|
||||||
public function SaveAlias(string $sName, string $sAlias) : bool
|
public function SaveAlias(string $sName, string $sAlias) : bool
|
||||||
{
|
{
|
||||||
if ($this->Load($sName, false, false)) {
|
if ($this->Load($sName, false, false)) {
|
||||||
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::DomainAlreadyExists);
|
throw new ClientException(\RainLoop\Notifications::DomainAlreadyExists);
|
||||||
}
|
}
|
||||||
return $this->oDriver->SaveAlias($sName, $sAlias);
|
return $this->oDriver->SaveAlias($sName, $sAlias);
|
||||||
}
|
}
|
||||||
|
|
@ -63,7 +65,7 @@ class Domain extends AbstractProvider
|
||||||
}
|
}
|
||||||
if (\strlen($sName) || $sNameForTest) {
|
if (\strlen($sName) || $sNameForTest) {
|
||||||
if (!$sNameForTest && !empty($oActions->GetActionParam('create', 0)) && $this->Load($sName)) {
|
if (!$sNameForTest && !empty($oActions->GetActionParam('create', 0)) && $this->Load($sName)) {
|
||||||
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::DomainAlreadyExists);
|
throw new ClientException(\RainLoop\Notifications::DomainAlreadyExists);
|
||||||
}
|
}
|
||||||
return \RainLoop\Model\Domain::fromArray($sNameForTest ?: $sName, [
|
return \RainLoop\Model\Domain::fromArray($sNameForTest ?: $sName, [
|
||||||
'IMAP' => $oActions->GetActionParam('IMAP'),
|
'IMAP' => $oActions->GetActionParam('IMAP'),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue