Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- overwrite default_imap_folders according to *_mbox settings (#14856…

…00) + some small updates
  • Loading branch information...
commit 569654a8c350de5b34cb65ae561bf95418b15f1c 1 parent aa320ed
@alecpl alecpl authored
Showing with 14 additions and 2 deletions.
  1. +2 −2 installer/config.php
  2. +12 −0 installer/rcube_install.php
View
4 installer/config.php
@@ -485,7 +485,7 @@
<legend>Display settings &amp; user prefs</legend>
<dl class="configblock" id="cgfblockdisplay">
-<dt class="propname">language</dt>
+<dt class="propname">language <span class="userconf">*</span></dt>
<dd>
<?php
@@ -559,7 +559,7 @@
$select_autosave = new html_select(array('name' => '_draft_autosave', 'id' => 'cfgautosave'));
$select_autosave->add('never', 0);
-foreach (array(3, 5, 10) as $i => $min)
+foreach (array(1, 3, 5, 10) as $i => $min)
$select_autosave->add("$min min", $min*60);
echo $select_autosave->show(intval($RCI->getprop('draft_autosave')));
View
12 installer/rcube_install.php
@@ -176,6 +176,18 @@ function create_config($which, $force = false)
else if ($prop == 'smtp_pass' && !empty($_POST['_smtp_user_u'])) {
$value = '%p';
}
+ else if ($prop == 'default_imap_folders'){
+ $value = Array();
+ foreach($this->config['default_imap_folders'] as $_folder){
+ switch($_folder) {
+ case 'Drafts': $_folder = $this->config['drafts_mbox']; break;
+ case 'Sent': $_folder = $this->config['sent_mbox']; break;
+ case 'Junk': $_folder = $this->config['junk_mbox']; break;
+ case 'Trash': $_folder = $this->config['trash_mbox']; break;
+ }
+ if (!in_array($_folder, $value)) $value[] = $_folder;
+ }
+ }
else if (is_bool($default)) {
$value = (bool)$value;
}
Please sign in to comment.
Something went wrong with that request. Please try again.