diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-02-28 21:52:57 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-02-28 21:52:57 +0000 |
| commit | 5a96eb45661ea8d5acba62fcb0493d90611212e9 (patch) | |
| tree | 6d030ae6da3a3548c8d1f7edfc52b924e555a71f /roundcubemail/installer/rcube_install.php | |
| parent | 316f71e7a7888f97354b513ff33104d1bc46855a (diff) | |
Add IMAP test and some more options to installer script
git-svn-id: https://svn.roundcube.net/trunk@1155 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/installer/rcube_install.php')
| -rw-r--r-- | roundcubemail/installer/rcube_install.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/roundcubemail/installer/rcube_install.php b/roundcubemail/installer/rcube_install.php index 65fbe097b..e02ee75ad 100644 --- a/roundcubemail/installer/rcube_install.php +++ b/roundcubemail/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 |
