alecpl
2008-08-26 9e8e5fa634ace418e6b34280133685485b97a9c0
- Removed support for PEAR::DB driver


8 files modified
17 files deleted
16991 ■■■■■ changed files
CHANGELOG 4 ●●●● patch | view | raw | blame | history
UPGRADING 2 ●●●●● patch | view | raw | blame | history
config/db.inc.php.dist 3 ●●●●● patch | view | raw | blame | history
installer/check.php 2 ●●● patch | view | raw | blame | history
installer/config.php 68 ●●●●● patch | view | raw | blame | history
installer/test.php 11 ●●●● patch | view | raw | blame | history
program/include/main.inc 3 ●●●● patch | view | raw | blame | history
program/include/rcmail.php 3 ●●●● patch | view | raw | blame | history
program/include/rcube_db.php 612 ●●●●● patch | view | raw | blame | history
program/lib/DB.php 1489 ●●●●● patch | view | raw | blame | history
program/lib/DB/common.php 2257 ●●●●● patch | view | raw | blame | history
program/lib/DB/dbase.php 510 ●●●●● patch | view | raw | blame | history
program/lib/DB/fbsql.php 769 ●●●●● patch | view | raw | blame | history
program/lib/DB/ibase.php 1082 ●●●●● patch | view | raw | blame | history
program/lib/DB/ifx.php 683 ●●●●● patch | view | raw | blame | history
program/lib/DB/msql.php 831 ●●●●● patch | view | raw | blame | history
program/lib/DB/mssql.php 963 ●●●●● patch | view | raw | blame | history
program/lib/DB/mysql.php 1045 ●●●●● patch | view | raw | blame | history
program/lib/DB/mysqli.php 1092 ●●●●● patch | view | raw | blame | history
program/lib/DB/oci8.php 1156 ●●●●● patch | view | raw | blame | history
program/lib/DB/odbc.php 883 ●●●●● patch | view | raw | blame | history
program/lib/DB/pgsql.php 1116 ●●●●● patch | view | raw | blame | history
program/lib/DB/sqlite.php 959 ●●●●● patch | view | raw | blame | history
program/lib/DB/storage.php 506 ●●●●● patch | view | raw | blame | history
program/lib/DB/sybase.php 942 ●●●●● patch | view | raw | blame | history
CHANGELOG
@@ -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)
UPGRADING
@@ -19,6 +19,8 @@
* 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
config/db.inc.php.dist
@@ -26,9 +26,6 @@
// 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
installer/check.php
@@ -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');
installer/config.php
@@ -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>
installer/test.php
@@ -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 {
program/include/main.inc
@@ -76,9 +76,8 @@
  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');
program/include/rcmail.php
@@ -216,10 +216,9 @@
  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');
program/include/rcube_db.php
File was deleted
program/lib/DB.php
File was deleted
program/lib/DB/common.php
File was deleted
program/lib/DB/dbase.php
File was deleted
program/lib/DB/fbsql.php
File was deleted
program/lib/DB/ibase.php
File was deleted
program/lib/DB/ifx.php
File was deleted
program/lib/DB/msql.php
File was deleted
program/lib/DB/mssql.php
File was deleted
program/lib/DB/mysql.php
File was deleted
program/lib/DB/mysqli.php
File was deleted
program/lib/DB/oci8.php
File was deleted
program/lib/DB/odbc.php
File was deleted
program/lib/DB/pgsql.php
File was deleted
program/lib/DB/sqlite.php
File was deleted
program/lib/DB/storage.php
File was deleted
program/lib/DB/sybase.php
File was deleted