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_pgsql.php | 31 ++++++++++++++++++++++++++-----
1 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/program/include/rcube_db_pgsql.php b/program/include/rcube_db_pgsql.php
index 782fc0e..797860a 100644
--- a/program/include/rcube_db_pgsql.php
+++ b/program/include/rcube_db_pgsql.php
@@ -23,23 +23,23 @@
/**
* Database independent query interface
- *
* This is a wrapper for the PHP PDO
*
- * @package Database
- * @version 1.0
+ * @package Framework
+ * @subpackage Database
*/
class rcube_db_pgsql extends rcube_db
{
+ public $db_provider = 'postgres';
+
/**
* Get last inserted record ID
- * For Postgres databases, a table name is required
*
* @param string $table Table name (to find the incremented sequence)
*
* @return mixed ID or false on failure
*/
- public function insert_id($table = '')
+ public function insert_id($table = null)
{
if (!$this->db_connected || $this->db_mode == 'r') {
return false;
@@ -55,6 +55,27 @@
}
/**
+ * Return correct name for a specific database sequence
+ *
+ * @param string $sequence Secuence name
+ *
+ * @return string Translated sequence name
+ */
+ protected function sequence_name($sequence)
+ {
+ $rcube = rcube::get_instance();
+
+ // return sequence name if configured
+ $config_key = 'db_sequence_'.$sequence;
+
+ if ($name = $rcube->config->get($config_key)) {
+ return $name;
+ }
+
+ return $sequence;
+ }
+
+ /**
* Return SQL statement to convert a field value into a unix timestamp
*
* This method is deprecated and should not be used anymore due to limitations
--
Gitblit v1.9.1