Permalink
Browse files

- Removed support for PEAR::DB driver

  • Loading branch information...
1 parent 6ed2560 commit 9e8e5fa634ace418e6b34280133685485b97a9c0 @alecpl alecpl committed Aug 26, 2008
View
@@ -1,6 +1,10 @@
CHANGELOG RoundCube Webmail
---------------------------
+2008/08/26 (alec)
+----------
+- Removed support for PEAR::DB driver
+
2008/08/21 (alec)
----------
- Add Content-Length header while attachments downloading (#1484256)
View
@@ -19,6 +19,8 @@ from version 0.2-alpha
* check the config/main.inc.php.dist for new configuration
options and add them to your config
WARNING: 'skin_path' option was replaced by 'skin' option
+* WARNING: 'db_backend' option has been removed, now only
+ PEAR::MDB2 driver is supported
from version 0.1.1
View
@@ -26,9 +26,6 @@ $rcmail_config['db_dsnw'] = 'mysql://roundcube:pass@localhost/roundcubemail';
// useful for database replication
$rcmail_config['db_dsnr'] = '';
-// database backend to use (only db or mdb2 are supported)
-$rcmail_config['db_backend'] = 'mdb2';
-
// maximum length of a query in bytes
$rcmail_config['db_max_length'] = 512000; // 500K
View
@@ -7,7 +7,7 @@
'Multibyte' => 'mbstring', 'OpenSSL' => 'openssl', 'Mcrypt' => 'mcrypt',
'GD' => 'gd');
-$required_libs = array('PEAR' => 'PEAR.php', 'DB' => 'DB.php', 'MDB2' => 'MDB2.php',
+$required_libs = array('PEAR' => 'PEAR.php', 'MDB2' => 'MDB2.php',
'Net_SMTP' => 'Net/SMTP.php', 'Mail_mime' => 'Mail/mime.php',
'iilConnection' => 'lib/imap.inc');
View
@@ -78,17 +78,6 @@
<div>The name of your service (used to compose page titles)</div>
</dd>
-<dt class="propname">skin</dt>
-<dd>
-<?php
-
-$input_skin = new html_inputfield(array('name' => '_skin', 'size' => 30, 'id' => "cfgskin"));
-echo $input_skin->show($RCI->getprop('skin'));
-
-?>
-<div>Name of interface skin (folder in /skins)</div>
-</dd>
-
<dt class="propname">temp_dir</dt>
<dd>
<?php
@@ -161,18 +150,6 @@
<p class="hint">It is based on GoogieSpell what implies that the message content will be sent to Google in order to check the spelling.</p>
</dd>
-<dt class="propname">mdn_requests</dt>
-<dd>
-<?php
-
-$select_mdnreq = new html_select(array('name' => '_mdn_requests', 'id' => "cfgmdnreq"));
-$select_mdnreq->add(array('ask the user', 'send automatically', 'ignore'), array(0, 1, 2));
-echo $select_mdnreq->show(intval($RCI->getprop('mdn_requests')));
-
-?>
-<div>Behavior if a received message requests a message delivery notification (read receipt)</div>
-</dd>
-
</dl>
</fieldset>
@@ -216,28 +193,6 @@
?>
</dd>
-
-<dt class="propname">db_backend</dt>
-<dd>
-<?php
-
-// check for existing PEAR classes
-@include_once 'DB.php';
-@include_once 'MDB2.php';
-
-$select_dbba = new html_select(array('name' => '_db_backend', 'id' => "cfgdbba"));
-
-if (class_exists('DB'))
- $select_dbba->add('DB', 'db');
-if (class_exists('MDB2'))
- $select_dbba->add('MDB2', 'mdb2');
-
-echo $select_dbba->show($RCI->getprop('db_backend'));
-
-?>
-<div>PEAR Database backend to use</div>
-</dd>
-
</dl>
</fieldset>
@@ -446,6 +401,17 @@
<p class="hint">Enter a <a href="http://www.faqs.org/rfcs/rfc1766">RFC1766</a> formatted language name. Examples: en_US, de_DE, de_CH, fr_FR, pt_BR</p>
</dd>
+<dt class="propname">skin <span class="userconf">*</span></dt>
+<dd>
+<?php
+
+$input_skin = new html_inputfield(array('name' => '_skin', 'size' => 30, 'id' => "cfgskin"));
+echo $input_skin->show($RCI->getprop('skin'));
+
+?>
+<div>Name of interface skin (folder in /skins)</div>
+</dd>
+
<dt class="propname">pagesize <span class="userconf">*</span></dt>
<dd>
<?php
@@ -505,6 +471,18 @@
?>
</dd>
+<dt class="propname">mdn_requests <span class="userconf">*</span></dt>
+<dd>
+<?php
+
+$select_mdnreq = new html_select(array('name' => '_mdn_requests', 'id' => "cfgmdnreq"));
+$select_mdnreq->add(array('ask the user', 'send automatically', 'ignore'), array(0, 1, 2));
+echo $select_mdnreq->show(intval($RCI->getprop('mdn_requests')));
+
+?>
+<div>Behavior if a received message requests a message delivery notification (read receipt)</div>
+</dd>
+
</dl>
<p class="hint"><span class="userconf">*</span>&nbsp; These settings are defaults for the user preferences</p>
View
@@ -61,14 +61,9 @@
$db_working = false;
if ($RCI->configured) {
- if (!empty($RCI->config['db_backend']) && !empty($RCI->config['db_dsnw'])) {
+ if (!empty($RCI->config['db_dsnw'])) {
- echo 'Backend: ';
- echo 'PEAR::' . strtoupper($RCI->config['db_backend']) . '<br />';
-
- $dbclass = 'rcube_' . strtolower($RCI->config['db_backend']);
-
- $DB = new $dbclass($RCI->config['db_dsnw'], '', false);
+ $DB = new rcube_mdb2($RCI->config['db_dsnw'], '', false);
$DB->db_connect('w');
if (!($db_error_msg = $DB->is_error())) {
$RCI->pass('DSN (write)');
@@ -79,8 +74,6 @@
$RCI->fail('DSN (write)', $db_error_msg);
echo '<p class="hint">Make sure that the configured database exists and that the user has 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 {
View
@@ -76,9 +76,8 @@ function get_sequence_name($sequence)
if (!empty($opt))
{
$db = &rcmail::get_instance()->db;
- $dbclass = 'rcube_mdb2';
- if ($db->db_provider=='pgsql' && ($db instanceof $dbclass))
+ if ($db->db_provider=='pgsql')
{
$db->db_handle->setOption('disable_smart_seqname', true);
$db->db_handle->setOption('seqname_format', '%s');
@@ -216,10 +216,9 @@ private function language_prop($lang)
public function get_dbh()
{
if (!$this->db) {
- $dbclass = "rcube_" . $this->config->get('db_backend', 'mdb2');
$config_all = $this->config->all();
- $this->db = new $dbclass($config_all['db_dsnw'], $config_all['db_dsnr'], $config_all['db_persistent']);
+ $this->db = new rcube_mdb2($config_all['db_dsnw'], $config_all['db_dsnr'], $config_all['db_persistent']);
$this->db->sqlite_initials = INSTALL_PATH . 'SQL/sqlite.initial.sql';
$this->db->set_debug((bool)$config_all['sql_debug']);
$this->db->db_connect('w');
Oops, something went wrong.

0 comments on commit 9e8e5fa

Please sign in to comment.