46 lines
1.8 KiB
Text
46 lines
1.8 KiB
Text
From 57b161111f42bbcf3b83d65bf3ad7c017335991a Mon Sep 17 00:00:00 2001
|
|
From: Aleksander Machniak <alec@alec.pl>
|
|
Date: Sat, 8 Jul 2023 09:08:50 +0200
|
|
Subject: [PATCH] Fix bug where installto.sh/update.sh scripts were removing
|
|
some essential options from the config file (#9051)
|
|
|
|
Index: program/include/rcmail_install.php
|
|
--- program/include/rcmail_install.php.orig
|
|
+++ program/include/rcmail_install.php
|
|
@@ -439,10 +439,10 @@ class rcmail_install
|
|
else {
|
|
$this->config[$replacement] = $current[$prop];
|
|
}
|
|
- }
|
|
|
|
- unset($current[$prop]);
|
|
- unset($current[$replacement]);
|
|
+ unset($current[$prop]);
|
|
+ unset($current[$replacement]);
|
|
+ }
|
|
}
|
|
|
|
// Merge old *_port options into the new *_host options, where possible
|
|
@@ -464,9 +464,9 @@ class rcmail_install
|
|
}
|
|
|
|
// add all ldap_public sources having global_search enabled to autocomplete_addressbooks
|
|
- if (is_array($current['ldap_public'])) {
|
|
+ if (!empty($current['ldap_public']) && is_array($current['ldap_public'])) {
|
|
foreach ($current['ldap_public'] as $key => $ldap_public) {
|
|
- if ($ldap_public['global_search']) {
|
|
+ if (!empty($ldap_public['global_search'])) {
|
|
$this->config['autocomplete_addressbooks'][] = $key;
|
|
unset($current['ldap_public'][$key]['global_search']);
|
|
}
|
|
@@ -474,10 +474,6 @@ class rcmail_install
|
|
}
|
|
|
|
$this->config = array_merge($this->config, $current);
|
|
-
|
|
- foreach (array_keys((array) $current['ldap_public']) as $key) {
|
|
- $this->config['ldap_public'][$key] = $current['ldap_public'][$key];
|
|
- }
|
|
}
|
|
|
|
/**
|