Merge branch 'release-1.3' into develop
This commit is contained in:
commit
b356625268
1
AUTHORS
1
AUTHORS
@ -22,6 +22,7 @@ Much appreciated contributors (in alphabetical order):
|
||||
Janez Troha <http://www.dz0ny.info> - Slovenian translation
|
||||
Jean-Philippe Fleury <jpfleury>
|
||||
Jerry <lxb429@gmail.com> - Chinese translation
|
||||
Jonathan Aillet - French translation
|
||||
Julien Issler <julien@issler.net>
|
||||
Litew <litew9@gmail.com> - Russian translation
|
||||
Ludovic Bellière <xrogaan>
|
||||
|
12
NEWS.mdtext
12
NEWS.mdtext
@ -1,4 +1,14 @@
|
||||
# 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
|
||||
|
||||
- French translation updated (thanks to Jonathan Aillet!)
|
||||
|
||||
# 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/).
|
||||
|
@ -141,7 +141,12 @@ class IDF_ActivityTaxonomy
|
||||
|
||||
$cache[$argIdent] = 0;
|
||||
list($higher, $lower) = $dateBoundaries;
|
||||
$sql = new Pluf_SQL('model_class IN ("'.implode('","', $classes).'") '.
|
||||
$db = Pluf::db();
|
||||
$classes_esc = array();
|
||||
foreach ($classes as $class) {
|
||||
$classes_esc[] = $db->esc($class);
|
||||
}
|
||||
$sql = new Pluf_SQL('model_class IN ('.implode(',', $classes_esc).') '.
|
||||
'AND creation_dtime >= %s AND creation_dtime <= %s',
|
||||
array($lower, $higher));
|
||||
|
||||
|
@ -53,7 +53,7 @@ class IDF_Forge
|
||||
}
|
||||
|
||||
public function getProjectLabelsWithCounts() {
|
||||
$sql = new Pluf_SQL('project=0');
|
||||
$sql = new Pluf_SQL('project IS NULL');
|
||||
$tagList = Pluf::factory('IDF_Tag')->getList(array(
|
||||
'filter' => $sql->gen(),
|
||||
'view' => 'join_projects',
|
||||
@ -92,4 +92,4 @@ class IDF_Forge
|
||||
public function setCustomForgePageContent($content) {
|
||||
$this->conf->setVal('custom_forge_page_content', $content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
46
src/IDF/Migrations/25NullableProjectInTag.php
Normal file
46
src/IDF/Migrations/25NullableProjectInTag.php
Normal file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/* -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/*
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# This file is part of InDefero, an open source project management application.
|
||||
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
|
||||
#
|
||||
# InDefero is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# InDefero is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# ***** END LICENSE BLOCK ***** */
|
||||
|
||||
function IDF_Migrations_25NullableProjectInTag_up($params=null)
|
||||
{
|
||||
$engine = Pluf::f('db_engine');
|
||||
$db = Pluf::db();
|
||||
|
||||
if ($engine === 'PostgreSQL') {
|
||||
$db->execute('ALTER TABLE '.$db->pfx.'idf_tags ALTER COLUMN project DROP NOT NULL');
|
||||
} else if ($engine === 'MySQL') {
|
||||
$db->execute('ALTER TABLE '.$db->pfx.'idf_tags MODIFY project MEDIUMINT NULL');
|
||||
// this is only needed for non-transactional setups where MySQL set 0 as default value
|
||||
$db->execute('UPDATE '.$db->pfx.'idf_tags SET project=NULL WHERE project=0');
|
||||
}
|
||||
}
|
||||
|
||||
function IDF_Migrations_25NullableProjectInTag_down($params=null)
|
||||
{
|
||||
$db = Pluf::db();
|
||||
if ($engine === 'PostgreSQL') {
|
||||
$db->execute('ALTER TABLE '.$db->pfx.'idf_tags ALTER COLUMN project SET NOT NULL');
|
||||
} else if ($engine === 'MySQL') {
|
||||
$db->execute('ALTER TABLE '.$db->pfx.'idf_tags MODIFY project MEDIUMINT NOT NULL');
|
||||
}
|
||||
}
|
@ -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'
|
||||
|
@ -48,7 +48,8 @@ class IDF_Tag extends Pluf_Model
|
||||
array(
|
||||
'type' => 'Pluf_DB_Field_Foreignkey',
|
||||
'model' => 'IDF_Project',
|
||||
'blank' => false,
|
||||
'blank' => true,
|
||||
'is_null' => true,
|
||||
'verbose' => __('project'),
|
||||
),
|
||||
'class' =>
|
||||
@ -76,13 +77,14 @@ class IDF_Tag extends Pluf_Model
|
||||
);
|
||||
|
||||
$table = $this->_con->pfx.'idf_project_idf_tag_assoc';
|
||||
$cols = implode(', ', array_keys($this->_a['cols']));
|
||||
$this->_a['views'] = array(
|
||||
'join_projects' =>
|
||||
array(
|
||||
'join' => 'LEFT JOIN '.$table
|
||||
.' ON idf_tag_id=id',
|
||||
'select' => $this->getSelect().',COUNT(idf_project_id) as project_count',
|
||||
'group' => 'idf_tag_id',
|
||||
'group' => $cols,
|
||||
'props' => array('project_count' => 'project_count'),
|
||||
),
|
||||
);
|
||||
@ -146,7 +148,7 @@ class IDF_Tag extends Pluf_Model
|
||||
$class = trim($class);
|
||||
$name = trim($name);
|
||||
$gtag = new IDF_Tag();
|
||||
$sql = new Pluf_SQL('class=%s AND lcname=%s AND project=0',
|
||||
$sql = new Pluf_SQL('class=%s AND lcname=%s AND project IS NULL',
|
||||
array($class, mb_strtolower($name)));
|
||||
$tags = $gtag->getList(array('filter' => $sql->gen()));
|
||||
if ($tags->count() < 1) {
|
||||
@ -154,6 +156,7 @@ class IDF_Tag extends Pluf_Model
|
||||
$tag = new IDF_Tag();
|
||||
$tag->name = $name;
|
||||
$tag->class = $class;
|
||||
$tag->project = null;
|
||||
$tag->create();
|
||||
return $tag;
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ class IDF_Template_MarkdownForge extends Pluf_Template_Tag
|
||||
$name = $class;
|
||||
$class = IDF_TAG_DEFAULT_CLASS;
|
||||
}
|
||||
$sql = new Pluf_SQL('class=%s AND lcname=%s AND project=0',
|
||||
$sql = new Pluf_SQL('class=%s AND lcname=%s AND project IS NULL',
|
||||
array(strtolower($class), mb_strtolower($name)));
|
||||
$tag = Pluf::factory('IDF_Tag')->getOne(array('filter' => $sql->gen()));
|
||||
}
|
||||
|
@ -382,14 +382,14 @@ 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));
|
||||
}
|
||||
|
||||
if ($user->isAnonymous())
|
||||
{
|
||||
$authSql = new Pluf_SQL('private=%s', $false);
|
||||
$authSql = new Pluf_SQL($db->qn('private').'='.$false);
|
||||
$sql->SAnd($authSql);
|
||||
} else
|
||||
if (!$user->administrator) {
|
||||
@ -403,7 +403,7 @@ class IDF_Views
|
||||
$permSql = new Pluf_SQL("model_class='IDF_Project' AND owner_class='Pluf_User' AND owner_id=%s AND negative=".$false, $user->id);
|
||||
$rows = Pluf::factory('Pluf_RowPermission')->getList(array('filter' => $permSql->gen()));
|
||||
|
||||
$authSql = new Pluf_SQL('private=%s', $false);
|
||||
$authSql = new Pluf_SQL($db->qn('private').'='.$false);
|
||||
if ($rows->count() > 0) {
|
||||
$ids = array();
|
||||
foreach ($rows as $row) {
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user