mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-06 07:57:02 +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;
|
namespace RainLoop\Actions;
|
||||||
|
|
||||||
|
use RainLoop\Enumerations\Capa;
|
||||||
|
|
||||||
trait Contacts
|
trait Contacts
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
@ -15,7 +17,7 @@ trait Contacts
|
||||||
$oDriver = null;
|
$oDriver = null;
|
||||||
try {
|
try {
|
||||||
// if ($this->oConfig->Get('contacts', 'enable', false)) {
|
// if ($this->oConfig->Get('contacts', 'enable', false)) {
|
||||||
if ($this->GetCapa(\RainLoop\Capa::CONTACTS)) {
|
if ($this->GetCapa(Capa::CONTACTS)) {
|
||||||
$oDriver = $this->fabrica('address-book', $oAccount);
|
$oDriver = $this->fabrica('address-book', $oAccount);
|
||||||
}
|
}
|
||||||
if ($oAccount && $oDriver) {
|
if ($oAccount && $oDriver) {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
namespace RainLoop\Actions;
|
namespace RainLoop\Actions;
|
||||||
|
|
||||||
use RainLoop\Enumerations\Capa;
|
|
||||||
use RainLoop\Exceptions\ClientException;
|
use RainLoop\Exceptions\ClientException;
|
||||||
use RainLoop\Notifications;
|
use RainLoop\Notifications;
|
||||||
use MailSo\Imap\Enumerations\FolderType;
|
use MailSo\Imap\Enumerations\FolderType;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
namespace RainLoop\Actions;
|
namespace RainLoop\Actions;
|
||||||
|
|
||||||
use RainLoop\Enumerations\Capa;
|
|
||||||
use RainLoop\Exceptions\ClientException;
|
use RainLoop\Exceptions\ClientException;
|
||||||
use RainLoop\Model\Account;
|
use RainLoop\Model\Account;
|
||||||
use RainLoop\Notifications;
|
use RainLoop\Notifications;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
namespace RainLoop\Actions;
|
namespace RainLoop\Actions;
|
||||||
|
|
||||||
use RainLoop\Enumerations\Capa;
|
|
||||||
use RainLoop\Notifications;
|
use RainLoop\Notifications;
|
||||||
use RainLoop\Utils;
|
use RainLoop\Utils;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
namespace RainLoop\Actions;
|
namespace RainLoop\Actions;
|
||||||
|
|
||||||
|
use RainLoop\Enumerations\Capa;
|
||||||
|
|
||||||
trait Themes
|
trait Themes
|
||||||
{
|
{
|
||||||
public function GetTheme(bool $bAdmin): string
|
public function GetTheme(bool $bAdmin): string
|
||||||
|
|
@ -11,7 +13,7 @@ trait Themes
|
||||||
$sTheme = $this->Config()->Get('webmail', 'theme', 'Default');
|
$sTheme = $this->Config()->Get('webmail', 'theme', 'Default');
|
||||||
if (!$bAdmin
|
if (!$bAdmin
|
||||||
&& ($oAccount = $this->getAccountFromToken(false))
|
&& ($oAccount = $this->getAccountFromToken(false))
|
||||||
&& $this->GetCapa(\RainLoop\Enumerations\Capa::THEMES)
|
&& $this->GetCapa(Capa::THEMES)
|
||||||
&& ($oSettingsLocal = $this->SettingsProvider(true)->Load($oAccount))) {
|
&& ($oSettingsLocal = $this->SettingsProvider(true)->Load($oAccount))) {
|
||||||
$sTheme = (string) $oSettingsLocal->GetConf('Theme', $sTheme);
|
$sTheme = (string) $oSettingsLocal->GetConf('Theme', $sTheme);
|
||||||
}
|
}
|
||||||
|
|
@ -146,7 +148,7 @@ trait Themes
|
||||||
{
|
{
|
||||||
$oAccount = $this->getAccountFromToken();
|
$oAccount = $this->getAccountFromToken();
|
||||||
|
|
||||||
if (!$this->GetCapa(\RainLoop\Enumerations\Capa::USER_BACKGROUND)) {
|
if (!$this->GetCapa(Capa::USER_BACKGROUND)) {
|
||||||
return $this->FalseResponse();
|
return $this->FalseResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace RainLoop\Actions;
|
namespace RainLoop\Actions;
|
||||||
|
|
||||||
|
use RainLoop\Enumerations\Capa;
|
||||||
use RainLoop\Notifications;
|
use RainLoop\Notifications;
|
||||||
use RainLoop\Utils;
|
use RainLoop\Utils;
|
||||||
use RainLoop\Model\Account;
|
use RainLoop\Model\Account;
|
||||||
|
|
@ -164,7 +165,7 @@ trait UserAuth
|
||||||
{
|
{
|
||||||
$this->Http()->ServerNoCache();
|
$this->Http()->ServerNoCache();
|
||||||
$oMainAccount = $this->getMainAccountFromToken(false);
|
$oMainAccount = $this->getMainAccountFromToken(false);
|
||||||
if ($sEmail && $oMainAccount && $this->GetCapa(\RainLoop\Enumerations\Capa::ADDITIONAL_ACCOUNTS)) {
|
if ($sEmail && $oMainAccount && $this->GetCapa(Capa::ADDITIONAL_ACCOUNTS)) {
|
||||||
$oAccount = null;
|
$oAccount = null;
|
||||||
if ($oMainAccount->Email() === $sEmail) {
|
if ($oMainAccount->Email() === $sEmail) {
|
||||||
$this->SetAdditionalAuthToken($oAccount);
|
$this->SetAdditionalAuthToken($oAccount);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue