From: Marcin Haba Date: Fri, 13 Mar 2015 20:48:55 +0000 (+0100) Subject: baculum: Add patch with fix to treat PostgreSQL tables names by framework X-Git-Tag: Release-7.2.0~75 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bf9678530c8930860c6e30409aa685141504e932;p=bacula%2Fbacula baculum: Add patch with fix to treat PostgreSQL tables names by framework --- 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]))