From 186f3fa81f232344742b0a1c6313ec0744cbd651 Mon Sep 17 00:00:00 2001 From: yllar <yllar.pajus@gmail.com> Date: Fri, 30 May 2008 12:31:49 -0400 Subject: [PATCH] et_EE update --- installer/rcube_install.php | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-) diff --git a/installer/rcube_install.php b/installer/rcube_install.php index efe139d..0240467 100644 --- a/installer/rcube_install.php +++ b/installer/rcube_install.php @@ -79,7 +79,7 @@ */ function _load_config($suffix) { - include '../config/main.inc' . $suffix; + @include '../config/main.inc' . $suffix; if (is_array($rcmail_config)) { $this->config += $rcmail_config; } @@ -102,8 +102,8 @@ { $value = $this->is_post && (isset($_POST["_$name"]) || $this->config_props[$name]) ? $_POST["_$name"] : $this->config[$name]; - if ($name == 'des_key' && !isset($_REQUEST["_$name"])) - $value = self::random_key(24); + if ($name == 'des_key' && !$this->configured && !isset($_REQUEST["_$name"])) + $value = rcube_install::random_key(24); return $value !== null && $value !== '' ? $value : $default; } @@ -137,15 +137,20 @@ if ($_POST['_dbtype'] == 'sqlite') $value = sprintf('%s://%s?mode=0646', $_POST['_dbtype'], $_POST['_dbname']{0} == '/' ? '/' . $_POST['_dbname'] : $_POST['_dbname']); else - $value = sprintf('%s://%s:%s@%s/%s', $_POST['_dbtype'], $_POST['_dbuser'], $_POST['_dbpass'], $_POST['_dbhost'], $_POST['_dbname']); + $value = sprintf('%s://%s:%s@%s/%s', $_POST['_dbtype'], + rawurlencode($_POST['_dbuser']), rawurlencode($_POST['_dbpass']), + $_POST['_dbhost'], $_POST['_dbname']); } else if ($prop == 'smtp_auth_type' && $value == '0') { $value = ''; } else if ($prop == 'default_host' && is_array($value)) { - $value = self::_clean_array($value); + $value = rcube_install::_clean_array($value); if (count($value) <= 1) $value = $value[0]; + } + else if ($prop == 'pagesize') { + $value = max(2, intval($value)); } else if ($prop == 'smtp_user' && !empty($_POST['_smtp_user_u'])) { $value = '%u'; @@ -171,7 +176,7 @@ $out); } - return $out; + return trim($out); } @@ -305,6 +310,8 @@ if (eregi(';$', trim($line))) { $DB->query($buff); $buff = ''; + if ($this->get_error()) + break; } } } -- Gitblit v1.9.1