From bf9678530c8930860c6e30409aa685141504e932 Mon Sep 17 00:00:00 2001 From: Marcin Haba Date: Fri, 13 Mar 2015 21:48:55 +0100 Subject: [PATCH] baculum: Add patch with fix to treat PostgreSQL tables names by framework --- .../patches/fix-for-bacula-pgsql-tables.patch | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 gui/baculum/debian/patches/fix-for-bacula-pgsql-tables.patch diff --git a/gui/baculum/debian/patches/fix-for-bacula-pgsql-tables.patch b/gui/baculum/debian/patches/fix-for-bacula-pgsql-tables.patch new file mode 100644 index 0000000000..3f39c1189a --- /dev/null +++ b/gui/baculum/debian/patches/fix-for-bacula-pgsql-tables.patch @@ -0,0 +1,20 @@ +Description: Fix to treating Bacula PostgreSQL tables names as lowercase characters. +Author: Marcin Haba +--- framework.orig/Data/ActiveRecord/TActiveRecordGateway.php 2014-08-26 16:45:36.000000000 +0200 ++++ framework/Data/ActiveRecord/TActiveRecordGateway.php 2015-02-08 20:55:43.000000000 +0100 +@@ -100,9 +100,15 @@ class TActiveRecordGateway extends TComp + public function getTableInfo(TDbConnection $connection, $tableName) + { + $connStr = $connection->getConnectionString(); ++ $connection->setActive(true); ++ $driver = $connection->getDriverName(); ++ if($driver == 'pgsql') { ++ $tableName = strtolower($tableName); ++ } + $key = $connStr.$tableName; + if(!isset($this->_tables[$key])) + { ++ + //call this first to ensure that unserializing the cache + //will find the correct driver dependent classes. + if(!isset($this->_meta[$connStr])) -- 2.39.2