mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 16:37:02 +03:00
Improved MessagesPerPage valid value #1540
This commit is contained in:
parent
bcc2c7b9ca
commit
41fc41984a
2 changed files with 3 additions and 3 deletions
|
|
@ -583,7 +583,7 @@ class Actions
|
||||||
'MaxBlockquotesLevel' => 0,
|
'MaxBlockquotesLevel' => 0,
|
||||||
'simpleAttachmentsList' => false,
|
'simpleAttachmentsList' => false,
|
||||||
'listGrouped' => $oConfig->Get('defaults', 'mail_list_grouped', false),
|
'listGrouped' => $oConfig->Get('defaults', 'mail_list_grouped', false),
|
||||||
'MessagesPerPage' => \max(5, (int) $oConfig->Get('webmail', 'messages_per_page', 25)),
|
'MessagesPerPage' => \max(10, \intval($oConfig->Get('webmail', 'messages_per_page', 25)) ?: 25),
|
||||||
'messageNewWindow' => false,
|
'messageNewWindow' => false,
|
||||||
'messageReadAuto' => true, // (bool) $oConfig->Get('webmail', 'message_read_auto', true),
|
'messageReadAuto' => true, // (bool) $oConfig->Get('webmail', 'message_read_auto', true),
|
||||||
'MessageReadDelay' => (int) $oConfig->Get('webmail', 'message_read_delay', 5),
|
'MessageReadDelay' => (int) $oConfig->Get('webmail', 'message_read_delay', 5),
|
||||||
|
|
@ -678,7 +678,7 @@ class Actions
|
||||||
$aResult['simpleAttachmentsList'] = (bool)$oSettings->GetConf('simpleAttachmentsList', $aResult['simpleAttachmentsList']);
|
$aResult['simpleAttachmentsList'] = (bool)$oSettings->GetConf('simpleAttachmentsList', $aResult['simpleAttachmentsList']);
|
||||||
$aResult['listGrouped'] = (bool)$oSettings->GetConf('listGrouped', $aResult['listGrouped']);
|
$aResult['listGrouped'] = (bool)$oSettings->GetConf('listGrouped', $aResult['listGrouped']);
|
||||||
$aResult['ContactsAutosave'] = (bool)$oSettings->GetConf('ContactsAutosave', $aResult['ContactsAutosave']);
|
$aResult['ContactsAutosave'] = (bool)$oSettings->GetConf('ContactsAutosave', $aResult['ContactsAutosave']);
|
||||||
$aResult['MessagesPerPage'] = \max(5, (int)$oSettings->GetConf('MessagesPerPage', $aResult['MessagesPerPage']));
|
$aResult['MessagesPerPage'] = \max(10, \intval($oSettings->GetConf('MessagesPerPage', $aResult['MessagesPerPage']) ?: $aResult['MessagesPerPage']));
|
||||||
$aResult['messageNewWindow'] = (int)$oSettings->GetConf('messageNewWindow', $aResult['messageNewWindow']);
|
$aResult['messageNewWindow'] = (int)$oSettings->GetConf('messageNewWindow', $aResult['messageNewWindow']);
|
||||||
$aResult['messageReadAuto'] = (int)$oSettings->GetConf('messageReadAuto', $aResult['messageReadAuto']);
|
$aResult['messageReadAuto'] = (int)$oSettings->GetConf('messageReadAuto', $aResult['messageReadAuto']);
|
||||||
$aResult['MessageReadDelay'] = (int)$oSettings->GetConf('MessageReadDelay', $aResult['MessageReadDelay']);
|
$aResult['MessageReadDelay'] = (int)$oSettings->GetConf('MessageReadDelay', $aResult['MessageReadDelay']);
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ trait User
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->setSettingsFromParams($oSettings, 'MessagesPerPage', 'int', function ($iValue) {
|
$this->setSettingsFromParams($oSettings, 'MessagesPerPage', 'int', function ($iValue) {
|
||||||
return \min(50, \max(10, $iValue));
|
return \min(100, \max(10, $iValue));
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->setSettingsFromParams($oSettings, 'Layout', 'int', function ($iValue) {
|
$this->setSettingsFromParams($oSettings, 'Layout', 'int', function ($iValue) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue