summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-10-29 19:12:39 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-10-29 19:12:39 +0000
commit708c914b71d349c050ead728a583422fef215dca (patch)
tree34c19341ea2134db6cc6f1390b51dbb65e42ae93
parent9cfb0f460b7823152b3974cc63d3096f2c001a4e (diff)
Let update script handle the replacement of 'multiple_identities' by 'identities_level'
git-svn-id: https://svn.roundcube.net/trunk@2023 208e9e7b-5314-0410-a742-e7e81cd9613c
-rwxr-xr-xroundcubemail/bin/update.sh6
-rw-r--r--roundcubemail/installer/rcube_install.php10
2 files changed, 11 insertions, 5 deletions
diff --git a/roundcubemail/bin/update.sh b/roundcubemail/bin/update.sh
index 5be763320..a9a917c8c 100755
--- a/roundcubemail/bin/update.sh
+++ b/roundcubemail/bin/update.sh
@@ -19,7 +19,7 @@ if ($RCI->configured) {
echo "(These config options should be present in the current configuration)\n";
foreach ($messages['missing'] as $msg) {
- echo '- ' . $msg['prop'] . ($msg['name'] ? ': ' . $msg['name'] : '') . "\n";
+ echo "- '" . $msg['prop'] . ($msg['name'] ? "': " . $msg['name'] : "'") . "\n";
$err++;
}
echo "\n";
@@ -31,7 +31,7 @@ if ($RCI->configured) {
echo "(These config options have been replaced or renamed)\n";
foreach ($messages['replaced'] as $msg) {
- echo "- " . $msg['prop'] . "\t\t was replaced by " . $msg['replacement'] . "\n";
+ echo "- '" . $msg['prop'] . "' was replaced by '" . $msg['replacement'] . "'\n";
$err++;
}
echo "\n";
@@ -43,7 +43,7 @@ if ($RCI->configured) {
echo "(You still have some obsolete or inexistent properties set. This isn't a problem but should be noticed)\n";
foreach ($messages['obsolete'] as $msg) {
- echo "- " . $msg['prop'] . ($msg['name'] ? ': ' . $msg['name'] : '') . "\n";
+ echo "- '" . $msg['prop'] . ($msg['name'] ? "': " . $msg['name'] : "'") . "\n";
$err++;
}
echo "\n";
diff --git a/roundcubemail/installer/rcube_install.php b/roundcubemail/installer/rcube_install.php
index 12afc15f7..cb9333e30 100644
--- a/roundcubemail/installer/rcube_install.php
+++ b/roundcubemail/installer/rcube_install.php
@@ -33,7 +33,11 @@ class rcube_install
var $bool_config_props = array();
var $obsolete_config = array('db_backend');
- var $replaced_config = array('skin_path' => 'skin', 'locale_string' => 'language');
+ var $replaced_config = array(
+ 'skin_path' => 'skin',
+ 'locale_string' => 'language',
+ 'multiple_identities' => 'identities_level',
+ );
// these config options are optional or can be set to null
var $optional_config = array(
@@ -214,7 +218,7 @@ class rcube_install
$out = $seen = array();
$optional = array_flip($this->optional_config);
- // ireate over the current configuration
+ // iterate over the current configuration
foreach ($this->config as $prop => $value) {
if ($replacement = $this->replaced_config[$prop]) {
$out['replaced'][] = array('prop' => $prop, 'replacement' => $replacement);
@@ -274,6 +278,8 @@ class rcube_install
if (isset($current[$prop])) {
if ($prop == 'skin_path')
$this->config[$replacement] = preg_replace('#skins/(\w+)/?$#', '\\1', $current[$prop]);
+ else if ($prop == 'multiple_identities')
+ $this->config[$replacement] = $current[$prop] ? 2 : 0;
else
$this->config[$replacement] = $current[$prop];