diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-03-03 21:32:15 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-03-03 21:32:15 +0000 |
| commit | ef8f8f0d4e074824a156b1b85495027afc15e8ac (patch) | |
| tree | 2daaf25ed659a141312d5fb8c7ad9bf71d0605c6 | |
| parent | db0f41fb27d497bc2b3c4e6e8934fcad9b8c2a6c (diff) | |
Make rcube_install class PHP4 compatible + add warning for MDB2 on PHP4 + set MDB2 as default
git-svn-id: https://svn.roundcube.net/trunk@1171 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/config/db.inc.php.dist | 2 | ||||
| -rw-r--r-- | roundcubemail/installer/rcube_install.php | 4 | ||||
| -rw-r--r-- | roundcubemail/installer/test.php | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/roundcubemail/config/db.inc.php.dist b/roundcubemail/config/db.inc.php.dist index b1cd37ed1..442ef6ed4 100644 --- a/roundcubemail/config/db.inc.php.dist +++ b/roundcubemail/config/db.inc.php.dist @@ -27,7 +27,7 @@ $rcmail_config['db_dsnw'] = 'mysql://roundcube:pass@localhost/roundcubemail'; $rcmail_config['db_dsnr'] = ''; // database backend to use (only db or mdb2 are supported) -$rcmail_config['db_backend'] = 'db'; +$rcmail_config['db_backend'] = 'mdb2'; // maximum length of a query in bytes $rcmail_config['db_max_length'] = 512000; // 500K diff --git a/roundcubemail/installer/rcube_install.php b/roundcubemail/installer/rcube_install.php index 79d003cdf..8caa79d02 100644 --- a/roundcubemail/installer/rcube_install.php +++ b/roundcubemail/installer/rcube_install.php @@ -103,7 +103,7 @@ class rcube_install $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); + $value = rcube_install::random_key(24); return $value !== null && $value !== '' ? $value : $default; } @@ -143,7 +143,7 @@ class rcube_install $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]; } diff --git a/roundcubemail/installer/test.php b/roundcubemail/installer/test.php index d83534bb3..7e9903991 100644 --- a/roundcubemail/installer/test.php +++ b/roundcubemail/installer/test.php @@ -55,6 +55,8 @@ if (!empty($RCI->config)) { $RCI->fail('DSN (write)', $db_error_msg); echo '<p class="hint">Make sure that the configured database extists and that the user as write privileges<br />'; echo 'DSN: ' . $RCI->config['db_dsnw'] . '</p>'; + if ($RCI->config['db_backend'] == 'mdb2') + echo '<p class="hint">There are known problems with MDB2 running on PHP 4. Try setting <tt>db_backend</tt> to \'db\' instead</p>'; } } else { |
