mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 03:29:20 +03:00
Fix Capa handling
This commit is contained in:
parent
c450965cb6
commit
986b3a79f1
6 changed files with 9 additions and 7 deletions
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
namespace RainLoop\Actions;
|
||||
|
||||
use RainLoop\Enumerations\Capa;
|
||||
|
||||
trait Contacts
|
||||
{
|
||||
/**
|
||||
|
|
@ -15,7 +17,7 @@ trait Contacts
|
|||
$oDriver = null;
|
||||
try {
|
||||
// if ($this->oConfig->Get('contacts', 'enable', false)) {
|
||||
if ($this->GetCapa(\RainLoop\Capa::CONTACTS)) {
|
||||
if ($this->GetCapa(Capa::CONTACTS)) {
|
||||
$oDriver = $this->fabrica('address-book', $oAccount);
|
||||
}
|
||||
if ($oAccount && $oDriver) {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace RainLoop\Actions;
|
||||
|
||||
use RainLoop\Enumerations\Capa;
|
||||
use RainLoop\Exceptions\ClientException;
|
||||
use RainLoop\Notifications;
|
||||
use MailSo\Imap\Enumerations\FolderType;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace RainLoop\Actions;
|
||||
|
||||
use RainLoop\Enumerations\Capa;
|
||||
use RainLoop\Exceptions\ClientException;
|
||||
use RainLoop\Model\Account;
|
||||
use RainLoop\Notifications;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace RainLoop\Actions;
|
||||
|
||||
use RainLoop\Enumerations\Capa;
|
||||
use RainLoop\Notifications;
|
||||
use RainLoop\Utils;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
namespace RainLoop\Actions;
|
||||
|
||||
use RainLoop\Enumerations\Capa;
|
||||
|
||||
trait Themes
|
||||
{
|
||||
public function GetTheme(bool $bAdmin): string
|
||||
|
|
@ -11,7 +13,7 @@ trait Themes
|
|||
$sTheme = $this->Config()->Get('webmail', 'theme', 'Default');
|
||||
if (!$bAdmin
|
||||
&& ($oAccount = $this->getAccountFromToken(false))
|
||||
&& $this->GetCapa(\RainLoop\Enumerations\Capa::THEMES)
|
||||
&& $this->GetCapa(Capa::THEMES)
|
||||
&& ($oSettingsLocal = $this->SettingsProvider(true)->Load($oAccount))) {
|
||||
$sTheme = (string) $oSettingsLocal->GetConf('Theme', $sTheme);
|
||||
}
|
||||
|
|
@ -146,7 +148,7 @@ trait Themes
|
|||
{
|
||||
$oAccount = $this->getAccountFromToken();
|
||||
|
||||
if (!$this->GetCapa(\RainLoop\Enumerations\Capa::USER_BACKGROUND)) {
|
||||
if (!$this->GetCapa(Capa::USER_BACKGROUND)) {
|
||||
return $this->FalseResponse();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace RainLoop\Actions;
|
||||
|
||||
use RainLoop\Enumerations\Capa;
|
||||
use RainLoop\Notifications;
|
||||
use RainLoop\Utils;
|
||||
use RainLoop\Model\Account;
|
||||
|
|
@ -164,7 +165,7 @@ trait UserAuth
|
|||
{
|
||||
$this->Http()->ServerNoCache();
|
||||
$oMainAccount = $this->getMainAccountFromToken(false);
|
||||
if ($sEmail && $oMainAccount && $this->GetCapa(\RainLoop\Enumerations\Capa::ADDITIONAL_ACCOUNTS)) {
|
||||
if ($sEmail && $oMainAccount && $this->GetCapa(Capa::ADDITIONAL_ACCOUNTS)) {
|
||||
$oAccount = null;
|
||||
if ($oMainAccount->Email() === $sEmail) {
|
||||
$this->SetAdditionalAuthToken($oAccount);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue