Changeset 0829b76 in github
- Timestamp:
- Nov 26, 2011 9:31:50 AM (18 months ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.8
- Children:
- 2cf55f4
- Parents:
- 3e5c709
- Files:
-
- 4 edited
-
CHANGELOG (modified) (1 diff)
-
config/main.inc.php.dist (modified) (1 diff)
-
installer/rcube_install.php (modified) (6 diffs)
-
program/include/rcube_config.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
CHANGELOG
r3e5c709 r0829b76 2 2 =========================== 3 3 4 - Fix merging some configuration options in update.sh script (#1485864) 4 5 - Fix so TEXT key will remove all HEADER keys in IMAP SEARCH (#1488208) 5 6 - Fix handling contact photo url with https:// prefix (#1488202) -
config/main.inc.php.dist
rce22f1e r0829b76 658 658 $rcmail_config['timezone'] = 'auto'; 659 659 660 // is daylight saving On? 661 $rcmail_config['dst_active'] = (bool)date('I');660 // is daylight saving On? Default: (bool)date('I'); 661 $rcmail_config['dst_active'] = null; 662 662 663 663 // prefer displaying HTML messages -
installer/rcube_install.php
r4348692 r0829b76 143 143 foreach ($this->config as $prop => $default) { 144 144 145 $value = (isset($_POST["_$prop"]) || $this->bool_config_props[$prop]) ? $_POST["_$prop"] : $default; 145 $is_default = !isset($_POST["_$prop"]); 146 $value = !$is_default || $this->bool_config_props[$prop] ? $_POST["_$prop"] : $default; 146 147 147 148 // convert some form data 148 if ($prop == 'debug_level' ) {149 $val = 0;150 if (is_array($value))149 if ($prop == 'debug_level' && !$is_default) { 150 if (is_array($value)) { 151 $val = 0; 151 152 foreach ($value as $dbgval) 152 153 $val += intval($dbgval); 153 $value = $val; 154 $value = $val; 155 } 154 156 } 155 157 else if ($which == 'db' && $prop == 'db_dsnw' && !empty($_POST['_dbtype'])) { 156 158 if ($_POST['_dbtype'] == 'sqlite') 157 159 $value = sprintf('%s://%s?mode=0646', $_POST['_dbtype'], $_POST['_dbname']{0} == '/' ? '/' . $_POST['_dbname'] : $_POST['_dbname']); 158 else 160 else if ($_POST['_dbtype']) 159 161 $value = sprintf('%s://%s:%s@%s/%s', $_POST['_dbtype'], 160 162 rawurlencode($_POST['_dbuser']), rawurlencode($_POST['_dbpass']), $_POST['_dbhost'], $_POST['_dbname']); … … 178 180 } 179 181 else if ($prop == 'default_imap_folders') { 180 $value = Array();182 $value = array(); 181 183 foreach ($this->config['default_imap_folders'] as $_folder) { 182 switch ($_folder) {184 switch ($_folder) { 183 185 case 'Drafts': $_folder = $this->config['drafts_mbox']; break; 184 186 case 'Sent': $_folder = $this->config['sent_mbox']; break; … … 207 209 $out = preg_replace( 208 210 '/(\$rcmail_config\[\''.preg_quote($prop).'\'\])\s+=\s+(.+);/Uie', 209 "'\\1 = ' . rcube_install::_dump_var(\$value ) . ';'",211 "'\\1 = ' . rcube_install::_dump_var(\$value, \$prop) . ';'", 210 212 $out); 211 213 } … … 300 302 $this->config = array(); 301 303 $this->load_defaults(); 302 304 303 305 foreach ($this->replaced_config as $prop => $replacement) { 304 306 if (isset($current[$prop])) { … … 329 331 if ($current['keep_alive'] && $current['session_lifetime'] < $current['keep_alive']) 330 332 $current['session_lifetime'] = max(10, ceil($current['keep_alive'] / 60) * 2); 331 333 332 334 $this->config = array_merge($this->config, $current); 333 335 334 336 foreach ((array)$current['ldap_public'] as $key => $values) { 335 337 $this->config['ldap_public'][$key] = $current['ldap_public'][$key]; … … 615 617 616 618 617 static function _dump_var($var) { 619 static function _dump_var($var, $name=null) { 620 // special values 621 switch ($name) { 622 case 'syslog_facility': 623 $list = array(32 => 'LOG_AUTH', 80 => 'LOG_AUTHPRIV', 72 => ' LOG_CRON', 624 24 => 'LOG_DAEMON', 0 => 'LOG_KERN', 128 => 'LOG_LOCAL0', 625 136 => 'LOG_LOCAL1', 144 => 'LOG_LOCAL2', 152 => 'LOG_LOCAL3', 626 160 => 'LOG_LOCAL4', 168 => 'LOG_LOCAL5', 176 => 'LOG_LOCAL6', 627 184 => 'LOG_LOCAL7', 48 => 'LOG_LPR', 16 => 'LOG_MAIL', 628 56 => 'LOG_NEWS', 40 => 'LOG_SYSLOG', 8 => 'LOG_USER', 64 => 'LOG_UUCP'); 629 if ($val = $list[$var]) 630 return $val; 631 break; 632 } 633 634 618 635 if (is_array($var)) { 619 636 if (empty($var)) { -
program/include/rcube_config.php
rf4f4354f r0829b76 91 91 // enable display_errors in 'show' level, but not for ajax requests 92 92 ini_set('display_errors', intval(empty($_REQUEST['_remote']) && ($this->prop['debug_level'] & 4))); 93 93 94 94 // set timezone auto settings values 95 95 if ($this->prop['timezone'] == 'auto') { 96 96 $this->prop['dst_active'] = intval(date('I')); 97 $this->prop['_timezone_value'] = date('Z') / 3600 - $this->prop['dst_active']; 97 $this->prop['_timezone_value'] = date('Z') / 3600 - $this->prop['dst_active']; 98 } 99 else if ($this->prop['dst_active'] === null) { 100 $this->prop['dst_active'] = intval(date('I')); 98 101 } 99 102
Note: See TracChangeset
for help on using the changeset viewer.
