alecpl
2010-04-23 bf67d60e435a6f01b835a0d5afb9737f81560433
program/include/rcube_mdb2.php
@@ -404,19 +404,11 @@
  {
    // get tables if not cached
    if (!$this->tables) {
      $this->tables = array();
      switch ($this->db_provider) {
        case 'sqlite':
          $result = $this->db_handle->query("SELECT name FROM sqlite_master WHERE type='table'");
          break;
        default:
          $result = $this->db_handle->query("SHOW TABLES");
      }
      if ($result !== false && !PEAR::isError($result))
        while ($rec = $result->fetchRow(MDB2_FETCHMODE_ORDERED))
          $this->tables[] = $rec[0];
      $this->db_handle->loadModule('Manager');
      if (!PEAR::isError($result = $this->db_handle->listTables()))
        $this->tables = $result;
      else
        $this->tables = array();
    }
    return $this->tables;
@@ -744,8 +736,7 @@
{
  if ($scope != 'prepare')
  {
    $debug_output = $scope . '('.$db->db_index.'): ';
    $debug_output .= $message . $db->getOption('log_line_break');
    $debug_output = $scope . '('.$db->db_index.'): ' . $message;
    write_log('sql', $debug_output);
  }
}