mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-06 07:57:02 +03:00
Added support for the default domain
This commit is contained in:
parent
1ca90a8d7a
commit
6ca3b44d05
3 changed files with 11 additions and 8 deletions
|
|
@ -35,12 +35,14 @@ class Domain extends \RainLoop\Providers\AbstractProvider
|
|||
|
||||
/**
|
||||
* @param string $sName
|
||||
* @param bool $bDefaultOnNull = false
|
||||
*
|
||||
* @return \RainLoop\Domain | null
|
||||
*/
|
||||
public function Load($sName)
|
||||
public function Load($sName, $bDefaultOnNull = false)
|
||||
{
|
||||
return $this->oDriver->Load($sName);
|
||||
$oDomain = $this->oDriver->Load($sName);
|
||||
return $oDomain ? $oDomain : ($bDefaultOnNull ? $this->oDriver->Load('default') : null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue