]> git.sur5r.net Git - bacula/bacula/commitdiff
baculum: Add patch with fix to treat PostgreSQL tables names by framework
authorMarcin Haba <marcin.haba@bacula.pl>
Fri, 13 Mar 2015 20:48:55 +0000 (21:48 +0100)
committerMarcin Haba <marcin.haba@bacula.pl>
Fri, 13 Mar 2015 20:48:55 +0000 (21:48 +0100)
gui/baculum/debian/patches/fix-for-bacula-pgsql-tables.patch [new file with mode: 0644]

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 (file)
index 0000000..3f39c11
--- /dev/null
@@ -0,0 +1,20 @@
+Description: Fix to treating Bacula PostgreSQL tables names as lowercase characters.
+Author: Marcin Haba <marcin.haba@bacula.pl>
+--- 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]))