From c16ab19dd4c85682f87160e96cc64e36c4fcb6d5 Mon Sep 17 00:00:00 2001 From: djmaze Date: Wed, 1 Dec 2021 23:36:01 +0100 Subject: [PATCH] Bugfix: PHP Notice Undefined index: HideUnsubscribed, UseThreads, ReplySameFolder --- .../v/0.0.0/app/libraries/RainLoop/Actions/Accounts.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Accounts.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Accounts.php index 232c8d861..3d7cf49b4 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Accounts.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Accounts.php @@ -136,14 +136,15 @@ trait Accounts $aResult['ContactsIsAllowed'] = $this->AddressBookProvider($oAccount)->IsActive(); $oSettingsLocal = $this->SettingsProvider(true)->Load($oAccount); if ($oSettingsLocal instanceof \RainLoop\Settings) { + $oConfig = $this->Config(); $aResult['SentFolder'] = (string) $oSettingsLocal->GetConf('SentFolder', ''); $aResult['DraftsFolder'] = (string) $oSettingsLocal->GetConf('DraftFolder', ''); $aResult['SpamFolder'] = (string) $oSettingsLocal->GetConf('SpamFolder', ''); $aResult['TrashFolder'] = (string) $oSettingsLocal->GetConf('TrashFolder', ''); $aResult['ArchiveFolder'] = (string) $oSettingsLocal->GetConf('ArchiveFolder', ''); - $aResult['HideUnsubscribed'] = (bool) $oSettingsLocal->GetConf('HideUnsubscribed', $aResult['HideUnsubscribed']); - $aResult['UseThreads'] = (bool) $oSettingsLocal->GetConf('UseThreads', $aResult['UseThreads']); - $aResult['ReplySameFolder'] = (bool) $oSettingsLocal->GetConf('ReplySameFolder', $aResult['ReplySameFolder']); + $aResult['HideUnsubscribed'] = (bool) $oSettingsLocal->GetConf('HideUnsubscribed', $oConfig->Get('labs', 'use_imap_list_subscribe', true)); + $aResult['UseThreads'] = (bool) $oSettingsLocal->GetConf('UseThreads', $oConfig->Get('defaults', 'mail_use_threads', false)); + $aResult['ReplySameFolder'] = (bool) $oSettingsLocal->GetConf('ReplySameFolder', $oConfig->Get('defaults', 'mail_reply_same_folder', false)); } // $this->Plugins()->InitAppData($bAdmin, $aResult, $oAccount);