Added default values configuration for user settings

This commit is contained in:
RainLoop Team 2015-02-04 18:10:57 +04:00
parent 72ac34ce19
commit 6576eee3c8
3 changed files with 22 additions and 11 deletions

View file

@ -2,7 +2,7 @@
"name": "RainLoop", "name": "RainLoop",
"title": "RainLoop Webmail", "title": "RainLoop Webmail",
"version": "1.8.0", "version": "1.8.0",
"release": "245", "release": "250",
"description": "Simple, modern & fast web-based email client", "description": "Simple, modern & fast web-based email client",
"homepage": "http://rainloop.net", "homepage": "http://rainloop.net",
"main": "gulpfile.js", "main": "gulpfile.js",
@ -36,7 +36,7 @@
"plugins" "plugins"
], ],
"readmeFilename": "README.md", "readmeFilename": "README.md",
"ownCloudPackageVersion": "2.2", "ownCloudPackageVersion": "2.3",
"engines": { "engines": {
"node": ">= 0.10.0" "node": ">= 0.10.0"
}, },

View file

@ -1437,16 +1437,16 @@ class Actions
$aResult['UseLocalProxyForExternalImages'] = (bool) $oConfig->Get('labs', 'use_local_proxy_for_external_images', false); $aResult['UseLocalProxyForExternalImages'] = (bool) $oConfig->Get('labs', 'use_local_proxy_for_external_images', false);
// user // user
$aResult['EditorDefaultType'] = (string) $oConfig->Get('webmail', 'editor_default_type', '');
$aResult['ShowImages'] = (bool) $oConfig->Get('webmail', 'show_images', false); $aResult['ShowImages'] = (bool) $oConfig->Get('webmail', 'show_images', false);
$aResult['ContactsAutosave'] = true;
$aResult['MPP'] = (int) $oConfig->Get('webmail', 'messages_per_page', 25); $aResult['MPP'] = (int) $oConfig->Get('webmail', 'messages_per_page', 25);
$aResult['SoundNotification'] = false; $aResult['SoundNotification'] = false;
$aResult['DesktopNotifications'] = false; $aResult['DesktopNotifications'] = false;
$aResult['UseThreads'] = false; $aResult['Layout'] = (int) $oConfig->Get('defaults', 'view_layout', \RainLoop\Enumerations\Layout::SIDE_PREVIEW);
$aResult['ReplySameFolder'] = false; $aResult['EditorDefaultType'] = (string) $oConfig->Get('defaults', 'view_editor_type', '');
$aResult['Layout'] = \RainLoop\Enumerations\Layout::SIDE_PREVIEW; $aResult['UseCheckboxesInList'] = (bool) $oConfig->Get('defaults', 'view_use_checkboxes', true);
$aResult['UseCheckboxesInList'] = true; $aResult['UseThreads'] = (bool) $oConfig->Get('defaults', 'mail_use_threads', false);
$aResult['ReplySameFolder'] = (bool) $oConfig->Get('defaults', 'mail_reply_same_folder', false);
$aResult['ContactsAutosave'] = (bool) $oConfig->Get('defaults', 'contacts_autosave', true);
$aResult['DefaultIdentityID'] = ''; $aResult['DefaultIdentityID'] = '';
$aResult['DisplayName'] = ''; $aResult['DisplayName'] = '';
$aResult['ReplyTo'] = ''; $aResult['ReplyTo'] = '';
@ -5539,6 +5539,8 @@ class Actions
{ {
$oAccount = $this->initMailClientConnection(); $oAccount = $this->initMailClientConnection();
$oConfig = $this->Config();
$sDraftFolder = $this->GetActionParam('MessageFolder', ''); $sDraftFolder = $this->GetActionParam('MessageFolder', '');
$sDraftUid = $this->GetActionParam('MessageUid', ''); $sDraftUid = $this->GetActionParam('MessageUid', '');
$sSentFolder = $this->GetActionParam('SentFolder', ''); $sSentFolder = $this->GetActionParam('SentFolder', '');
@ -5691,7 +5693,9 @@ class Actions
$oSettings = $this->SettingsProvider()->Load($oAccount); $oSettings = $this->SettingsProvider()->Load($oAccount);
$this->AddressBookProvider($oAccount)->IncFrec( $this->AddressBookProvider($oAccount)->IncFrec(
$oAccount->ParentEmailHelper(), \array_values($aArrayToFrec), !!$oSettings->GetConf('ContactsAutosave', true)); $oAccount->ParentEmailHelper(), \array_values($aArrayToFrec),
!!$oSettings->GetConf('ContactsAutosave',
!!$oConfig->Get('defaults', 'contacts_autosave', true)));
} }
} }
} }

View file

@ -73,8 +73,6 @@ class Application extends \RainLoop\Config\AbstractConfig
'messages_per_page' => array(20, ' Number of messages displayed on page by default'), 'messages_per_page' => array(20, ' Number of messages displayed on page by default'),
'editor_default_type' => array('Html', 'Editor mode used by default (Html or Plain)'),
'attachment_size_limit' => array(25, 'attachment_size_limit' => array(25,
'File size limit (MB) for file upload on compose screen 'File size limit (MB) for file upload on compose screen
0 for unlimited.') 0 for unlimited.')
@ -162,6 +160,15 @@ Values:
'enabled_list' => array('', 'List of enabled plugins'), 'enabled_list' => array('', 'List of enabled plugins'),
), ),
'defaults' => array(
'view_editor_type' => array('Html', 'Editor mode used by default (Plain, Html, HtmlForced or PlainForced)'),
'view_layout' => array(1, 'layout: 0 - no preview, 1 - side preview, 3 - bottom preview'),
'view_use_checkboxes' => array(true),
'contacts_autosave' => array(true),
'mail_use_threads' => array(false),
'mail_reply_same_folder' => array(false)
),
'logs' => array( 'logs' => array(
'enable' => array(false, 'Enable logging'), 'enable' => array(false, 'Enable logging'),