mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
Add alias support (domains)
This commit is contained in:
parent
a1d829c697
commit
28a125426a
26 changed files with 1014 additions and 92 deletions
|
|
@ -4082,25 +4082,14 @@ NewThemeLink IncludeCss LoadingDescriptionEsc TemplatesLink LangLink IncludeBack
|
|||
$iOffset = (int) $this->GetActionParam('Offset', 0);
|
||||
$iLimit = (int) $this->GetActionParam('Limit', 20);
|
||||
$sSearch = (string) $this->GetActionParam('Search', '');
|
||||
$bIncludeAliases = '1' === (string) $this->GetActionParam('IncludeAliases', '1');
|
||||
|
||||
$iOffset = 0;
|
||||
$sSearch = '';
|
||||
$iLimit = $this->Config()->Get('labs', 'domain_list_limit', 99);
|
||||
|
||||
$sSearch = \trim($sSearch);
|
||||
|
||||
if ($iOffset < 0)
|
||||
{
|
||||
$iOffset = 0;
|
||||
}
|
||||
|
||||
if ($iLimit < 20)
|
||||
{
|
||||
$iLimit = 20;
|
||||
}
|
||||
|
||||
return $this->DefaultResponse(__FUNCTION__,
|
||||
$this->DomainProvider()->GetList($iOffset, $iLimit, $sSearch));
|
||||
$this->DomainProvider()->GetList($iOffset, $iLimit, $sSearch, $bIncludeAliases));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -4140,6 +4129,19 @@ NewThemeLink IncludeCss LoadingDescriptionEsc TemplatesLink LangLink IncludeBack
|
|||
$oDomain instanceof \RainLoop\Model\Domain ? $this->DomainProvider()->Save($oDomain) : false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function DoAdminDomainAliasSave()
|
||||
{
|
||||
$this->IsAdminLoggined();
|
||||
|
||||
return $this->DefaultResponse(__FUNCTION__, $this->DomainProvider()->SaveAlias(
|
||||
(string) $this->GetActionParam('Name', ''),
|
||||
(string) $this->GetActionParam('Alias', '')
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue