summaryrefslogtreecommitdiff
path: root/installer/rcube_install.php
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-02-28 21:52:57 +0000
committerthomascube <thomas@roundcube.net>2008-02-28 21:52:57 +0000
commit27564f1a22d42cdcdb1d2972ca79cc537876c44c (patch)
tree722052b49d0f0984895b7f4422b635a2439c0b83 /installer/rcube_install.php
parent05c8d804924bce5bdd0f57c23d77cdf20afb620f (diff)
Add IMAP test and some more options to installer script
Diffstat (limited to 'installer/rcube_install.php')
-rw-r--r--installer/rcube_install.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/installer/rcube_install.php b/installer/rcube_install.php
index 65fbe097b..e02ee75ad 100644
--- a/installer/rcube_install.php
+++ b/installer/rcube_install.php
@@ -29,6 +29,7 @@ class rcube_install
var $configured = false;
var $last_error = null;
var $email_pattern = '([a-z0-9][a-z0-9\-\.\+\_]*@[a-z0-9]([a-z0-9\-][.]?)*[a-z0-9])';
+ var $config_props = array();
/**
* Constructor
@@ -97,7 +98,7 @@ class rcube_install
*/
function getprop($name, $default = '')
{
- $value = isset($_REQUEST["_$name"]) ? $_REQUEST["_$name"] : $this->config[$name];
+ $value = $_SERVER['REQUEST_METHOD'] == 'POST' ? $_POST["_$name"] : $this->config[$name];
if ($name == 'des_key' && !isset($_REQUEST["_$name"]))
$value = self::random_key(24);
@@ -121,7 +122,7 @@ class rcube_install
return '[Warning: could not read the template file]';
foreach ($this->config as $prop => $default) {
- $value = $_POST["_$prop"] ? $_POST["_$prop"] : $default;
+ $value = (isset($_POST["_$prop"]) || $this->config_props[$prop]) ? $_POST["_$prop"] : $default;
// convert some form data
if ($prop == 'debug_level' && is_array($value)) {
@@ -148,7 +149,10 @@ class rcube_install
$value = '%p';
}
else if (is_bool($default)) {
- $value = is_numeric($value) ? (bool)$value : $value;
+ $value = (bool)$value;
+ }
+ else if (is_numeric($value)) {
+ $value = intval($value);
}
// skip this property