Fix PostgreSQL compatibility issues.

release-1.3
Thomas Keller 2012-04-18 00:55:29 +02:00
parent 316c57f85b
commit d46df5c129
3 changed files with 12 additions and 4 deletions

View File

@ -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 This new major release of Indefero is possible thanks to the sponsor of
[Scilab Enterprises](http://www.scilab-enterprises.com/). [Scilab Enterprises](http://www.scilab-enterprises.com/).

View File

@ -115,8 +115,7 @@ class IDF_Project extends Pluf_Model
array( array(
'join' => 'LEFT JOIN '.$activityTable.' ON current_activity='.$activityTable.'.id ' 'join' => 'LEFT JOIN '.$activityTable.' ON current_activity='.$activityTable.'.id '
.'LEFT JOIN '.$tagTable.' ON idf_project_id='.$this->getSqlTable().'.id', .'LEFT JOIN '.$tagTable.' ON idf_project_id='.$this->getSqlTable().'.id',
'select' => $this->getSelect().', date, value', 'select' => 'DISTINCT '.$this->getSelect().', date, value',
'group' => $this->getSqlTable().'.id',
'props' => array( 'props' => array(
'date' => 'current_activity_date', 'date' => 'current_activity_date',
'value' => 'current_activity_value' 'value' => 'current_activity_value'

View File

@ -382,7 +382,7 @@ class IDF_Views
{ {
$db =& Pluf::db(); $db =& Pluf::db();
$false = Pluf_DB_BooleanToDb(false, $db); $false = Pluf_DB_BooleanToDb(false, $db);
$sql = new Pluf_SQL(1); $sql = new Pluf_SQL('1=1');
if ($tag !== false) { if ($tag !== false) {
$sql->SAnd(new Pluf_SQL('idf_tag_id=%s', $tag->id)); $sql->SAnd(new Pluf_SQL('idf_tag_id=%s', $tag->id));
} }