Changeset 5f25a1a in github
- Timestamp:
- Dec 30, 2008 7:26:13 AM (4 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 64db7e1
- Parents:
- 89f0042
- Files:
-
- 2 edited
-
config/main.inc.php.dist (modified) (1 diff)
-
installer/rcube_install.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
config/main.inc.php.dist
r230f944 r5f25a1a 237 237 // In order to enable public ldap search, configure an array like the Verisign 238 238 // example further below. if you would like to test, simply uncomment the example. 239 $rcmail_config['ldap_public'] = array(); 240 239 241 // 240 242 // If you are going to use LDAP for individual address books, you will need to -
installer/rcube_install.php
r2a41355 r5f25a1a 44 44 var $optional_config = array( 45 45 'log_driver', 'syslog_id', 'syslog_facility', 'imap_auth_type', 46 'smtp_helo_host', 's endmail_delay', 'double_auth', 'language',47 ' mail_header_delimiter', 'create_default_folders',46 'smtp_helo_host', 'smtp_auth_type', 'sendmail_delay', 'double_auth', 47 'language', 'mail_header_delimiter', 'create_default_folders', 48 48 'quota_zero_as_unlimited', 'spellcheck_uri', 'spellcheck_languages', 49 49 'http_received_header', 'session_domain', 'mime_magic', 'log_logins', 50 'enable_installer', 'skin_include_php'); 50 'enable_installer', 'skin_include_php', 'imap_root', 'imap_delimiter', 51 'virtuser_file', 'virtuser_query', 'dont_override'); 51 52 52 53 /** … … 193 194 $out = preg_replace( 194 195 '/(\$rcmail_config\[\''.preg_quote($prop).'\'\])\s+=\s+(.+);/Uie', 195 "'\\1 = ' . var_export(\$value, true) . ';'",196 "'\\1 = ' . rcube_install::_dump_var(\$value) . ';'", 196 197 $out); 197 198 } … … 259 260 'explain' => 'Using <tt>syslog</tt> for logging requires a syslog ID to be configured'); 260 261 } 261 262 } 263 264 // check ldap_public sources having global_search enabled 265 if (is_array($this->config['ldap_public']) && !is_array($this->config['autocomplete_addressbooks'])) { 266 foreach ($this->config['ldap_public'] as $ldap_public) { 267 if ($ldap_public['global_search']) { 268 $out['replaced'][] = array('prop' => 'ldap_public::global_search', 'replacement' => 'autocomplete_addressbooks'); 269 break; 270 } 271 } 262 272 } 263 273 … … 292 302 } 293 303 294 $this->config = array_merge($current, $this->config); 304 // add all ldap_public sources having global_search enabled to autocomplete_addressbooks 305 if (is_array($current['ldap_public'])) { 306 foreach ($current['ldap_public'] as $key => $ldap_public) { 307 if ($ldap_public['global_search']) { 308 $this->config['autocomplete_addressbooks'][] = $key; 309 unset($current['ldap_public'][$key]['global_search']); 310 } 311 } 312 } 313 314 $this->config = array_merge($this->config, $current); 315 316 foreach ((array)$current['ldap_public'] as $key => $values) { 317 $this->config['ldap_public'][$key] = $current['ldap_public'][$key]; 318 } 295 319 } 296 320 … … 458 482 459 483 460 function _clean_array($arr)484 static function _clean_array($arr) 461 485 { 462 486 $out = array(); 463 487 464 foreach (array_unique($arr) as $i => $val) 465 if (!empty($val)) 466 $out[] = $val; 488 foreach (array_unique($arr) as $k => $val) { 489 if (!empty($val)) { 490 if (is_numeric($k)) 491 $out[] = $val; 492 else 493 $out[$k] = $val; 494 } 495 } 467 496 468 497 return $out; 498 } 499 500 501 static function _dump_var($var) { 502 if (is_array($var)) { 503 if (empty($var)) { 504 return 'array()'; 505 } 506 else { // check if all keys are numeric 507 $isnum = true; 508 foreach ($var as $key => $value) { 509 if (!is_numeric($key)) { 510 $isnum = false; 511 break; 512 } 513 } 514 515 if ($isnum) 516 return 'array(' . join(', ', array_map(array('rcube_install', '_dump_var'), $var)) . ')'; 517 } 518 } 519 520 return var_export($var, true); 469 521 } 470 522
Note: See TracChangeset
for help on using the changeset viewer.
