From d46df5c129145f630d94fed7da935da94d268a04 Mon Sep 17 00:00:00 2001 From: Thomas Keller Date: Wed, 18 Apr 2012 00:55:29 +0200 Subject: [PATCH] Fix PostgreSQL compatibility issues. --- NEWS.mdtext | 11 ++++++++++- src/IDF/Project.php | 3 +-- src/IDF/Views.php | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/NEWS.mdtext b/NEWS.mdtext index f60d06d..56ce46f 100644 --- a/NEWS.mdtext +++ b/NEWS.mdtext @@ -1,4 +1,13 @@ -# InDefero 1.3 - Sun Apr 15 21:10 2011 UTC +# InDefero 1.3.1 - xxx xxx xx xx:xx 2012 UTC + +## Bugfixes + +- Compatiblity fixes for PostgreSQL + +## Language and Translations + + +# InDefero 1.3 - Sun Apr 15 21:10 2012 UTC This new major release of Indefero is possible thanks to the sponsor of [Scilab Enterprises](http://www.scilab-enterprises.com/). diff --git a/src/IDF/Project.php b/src/IDF/Project.php index 8cafd2c..04cd41b 100644 --- a/src/IDF/Project.php +++ b/src/IDF/Project.php @@ -115,8 +115,7 @@ class IDF_Project extends Pluf_Model array( 'join' => 'LEFT JOIN '.$activityTable.' ON current_activity='.$activityTable.'.id ' .'LEFT JOIN '.$tagTable.' ON idf_project_id='.$this->getSqlTable().'.id', - 'select' => $this->getSelect().', date, value', - 'group' => $this->getSqlTable().'.id', + 'select' => 'DISTINCT '.$this->getSelect().', date, value', 'props' => array( 'date' => 'current_activity_date', 'value' => 'current_activity_value' diff --git a/src/IDF/Views.php b/src/IDF/Views.php index 85dfa9b..64979e7 100644 --- a/src/IDF/Views.php +++ b/src/IDF/Views.php @@ -382,7 +382,7 @@ class IDF_Views { $db =& Pluf::db(); $false = Pluf_DB_BooleanToDb(false, $db); - $sql = new Pluf_SQL(1); + $sql = new Pluf_SQL('1=1'); if ($tag !== false) { $sql->SAnd(new Pluf_SQL('idf_tag_id=%s', $tag->id)); }