From 873ae9e9de2aba0f22f3669b1e1519a439d97b5c Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Thu, 31 Jan 2013 09:59:46 -0500
Subject: [PATCH] Add work-around for IE <= 8 which doesn't support :last-child CSS selector

---
 program/lib/Roundcube/rcube_db_sqlite.php |   13 ++-----------
 1 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/program/lib/Roundcube/rcube_db_sqlite.php b/program/lib/Roundcube/rcube_db_sqlite.php
index 9aa67d0..145b8a3 100644
--- a/program/lib/Roundcube/rcube_db_sqlite.php
+++ b/program/lib/Roundcube/rcube_db_sqlite.php
@@ -2,8 +2,6 @@
 
 /**
  +-----------------------------------------------------------------------+
- | program/include/rcube_db_sqlite.php                                   |
- |                                                                       |
  | This file is part of the Roundcube Webmail client                     |
  | Copyright (C) 2005-2012, The Roundcube Dev Team                       |
  |                                                                       |
@@ -14,12 +12,10 @@
  | PURPOSE:                                                              |
  |   Database wrapper class that implements PHP PDO functions            |
  |   for SQLite database                                                 |
- |                                                                       |
  +-----------------------------------------------------------------------+
  | Author: Aleksander Machniak <alec@alec.pl>                            |
  +-----------------------------------------------------------------------+
 */
-
 
 /**
  * Database independent query interface
@@ -66,7 +62,7 @@
 
         // Initialize database structure in file is empty
         if (!empty($dsn['database']) && !filesize($dsn['database'])) {
-            $data = file_get_contents(INSTALL_PATH . 'SQL/sqlite.initial.sql');
+            $data = file_get_contents(RCUBE_INSTALL_PATH . 'SQL/sqlite.initial.sql');
 
             if (strlen($data)) {
                 $this->debug('INITIALIZE DATABASE');
@@ -124,12 +120,7 @@
             $q = $this->query('SELECT name FROM sqlite_master'
                 .' WHERE type = \'table\' ORDER BY name');
 
-            if ($res = $this->_get_result($q)) {
-                $this->tables = $res->fetchAll(PDO::FETCH_COLUMN, 0);
-            }
-            else {
-                $this->tables = array();
-            }
+            $this->tables = $q ? $q->fetchAll(PDO::FETCH_COLUMN, 0) : array();
         }
 
         return $this->tables;

--
Gitblit v1.9.1