From be9aacaa5296dfca63fb3a01c2dc52538d1546aa Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Sat, 17 Nov 2012 12:31:31 -0500
Subject: [PATCH] Bring back lost localization for the about page
---
program/include/rcube_db_sqlite.php | 24 ++++++++++++++----------
1 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/program/include/rcube_db_sqlite.php b/program/include/rcube_db_sqlite.php
index 1fcecd6..9aa67d0 100644
--- a/program/include/rcube_db_sqlite.php
+++ b/program/include/rcube_db_sqlite.php
@@ -1,6 +1,6 @@
<?php
-/*
+/**
+-----------------------------------------------------------------------+
| program/include/rcube_db_sqlite.php |
| |
@@ -23,14 +23,15 @@
/**
* Database independent query interface
- *
* This is a wrapper for the PHP PDO
*
- * @package Database
- * @version 1.0
+ * @package Framework
+ * @subpackage Database
*/
class rcube_db_sqlite extends rcube_db
{
+ public $db_provider = 'sqlite';
+
/**
* Database character set
*/
@@ -45,7 +46,12 @@
{
// Create database file, required by PDO to exist on connection
if (!empty($dsn['database']) && !file_exists($dsn['database'])) {
- touch($dsn['database']);
+ $created = touch($dsn['database']);
+
+ // File mode setting, for compat. with MDB2
+ if (!empty($dsn['mode']) && $created) {
+ chmod($dsn['database'], octdec($dsn['mode']));
+ }
}
}
@@ -63,14 +69,12 @@
$data = file_get_contents(INSTALL_PATH . 'SQL/sqlite.initial.sql');
if (strlen($data)) {
- if ($this->options['debug_mode']) {
- $this::debug('INITIALIZE DATABASE');
- }
+ $this->debug('INITIALIZE DATABASE');
$q = $dbh->exec($data);
if ($q === false) {
- $error = $this->dbh->errorInfo();
+ $error = $dbh->errorInfo();
$this->db_error = true;
$this->db_error_msg = sprintf('[%s] %s', $error[1], $error[2]);
@@ -134,7 +138,7 @@
/**
* Returns list of columns in database table
*
- * @param string Table name
+ * @param string $table Table name
*
* @return array List of table cols
*/
--
Gitblit v1.9.1