]> git.sur5r.net Git - bacula/bacula/blob - gui/baculum/debian/patches/fix-for-bacula-pgsql-tables.patch
baculum: Add patch with fix to treat PostgreSQL tables names by framework
[bacula/bacula] / gui / baculum / debian / patches / fix-for-bacula-pgsql-tables.patch
1 Description: Fix to treating Bacula PostgreSQL tables names as lowercase characters.
2 Author: Marcin Haba <marcin.haba@bacula.pl>
3 --- framework.orig/Data/ActiveRecord/TActiveRecordGateway.php   2014-08-26 16:45:36.000000000 +0200
4 +++ framework/Data/ActiveRecord/TActiveRecordGateway.php        2015-02-08 20:55:43.000000000 +0100
5 @@ -100,9 +100,15 @@ class TActiveRecordGateway extends TComp
6         public function getTableInfo(TDbConnection $connection, $tableName)
7         {
8                 $connStr = $connection->getConnectionString();
9 +               $connection->setActive(true);
10 +               $driver = $connection->getDriverName();
11 +               if($driver == 'pgsql') {
12 +                       $tableName = strtolower($tableName);
13 +               }
14                 $key = $connStr.$tableName;
15                 if(!isset($this->_tables[$key]))
16                 {
17 +
18                         //call this first to ensure that unserializing the cache
19                         //will find the correct driver dependent classes.
20                         if(!isset($this->_meta[$connStr]))