Merge branch 'release-1.3' into develop
This commit is contained in:
commit
01febe1411
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,6 +5,7 @@
|
||||
.settings
|
||||
.tx/config
|
||||
attachments
|
||||
backups
|
||||
indefero-*.zip
|
||||
src/IDF/conf/idf.php
|
||||
src/IDF/conf/idf.test.php
|
||||
|
23
Makefile
23
Makefile
@ -37,10 +37,11 @@ help:
|
||||
@printf "\tpo-push - Send the all PO files to the transifex server.\n"
|
||||
@printf "\tpo-pull - Get all PO files from the transifex server.\n"
|
||||
@printf "\tpo-stats - Show translation statistics of all PO files.\n"
|
||||
@printf "\nMisc Rules :\n";
|
||||
@printf "\tdb-install - Install the database schema.\n"
|
||||
@printf "\tdb-update - Update the database schema.\n"
|
||||
|
||||
@printf "\nRules for managing the database :\n";
|
||||
@printf "\tdb-install - Install the database schema.\n"
|
||||
@printf "\tdb-update - Update the database schema.\n"
|
||||
@printf "\tdb-backup-foo - Create a named backup 'foo' with data from the current database.\n"
|
||||
@printf "\tdb-restore-foo - Restore schema and the data from a named backup 'foo' to an empty database.\n"
|
||||
|
||||
#
|
||||
# Internationalization rule, POT & PO file manipulation
|
||||
@ -139,8 +140,8 @@ po-stats:
|
||||
# make develop_zipfile
|
||||
#
|
||||
%-zipfile:
|
||||
@git archive --format=zip --prefix="indefero/" $(@:-zipfile=) \
|
||||
> indefero-$(@:-zipfile=)-`git log $(@:-zipfile=) -n 1 \
|
||||
@git archive --format=zip --prefix="indefero/" $* \
|
||||
> indefero-$*-`git log $* -n 1 \
|
||||
--pretty=format:%h`.zip
|
||||
|
||||
db-install:
|
||||
@ -148,3 +149,13 @@ db-install:
|
||||
|
||||
db-update:
|
||||
@cd src && php "$(PLUF_PATH)/migrate.php" --conf=IDF/conf/idf.php -a -d
|
||||
|
||||
db-backup-%:
|
||||
@[ -e backups ] || mkdir backups
|
||||
@cd src && php "$(PLUF_PATH)/migrate.php" --conf=IDF/conf/idf.php -a -b ../backups $*
|
||||
@echo Files for named backup $* have been saved into backups/ directory.
|
||||
|
||||
db-restore-%:
|
||||
@cd src && php "$(PLUF_PATH)/migrate.php" --conf=IDF/conf/idf.php -a -r ../backups $*
|
||||
@echo Files for named backup $* have been restored from the backups/ directory.
|
||||
|
||||
|
22
NEWS.mdtext
22
NEWS.mdtext
@ -6,6 +6,28 @@
|
||||
you filter and search by overdue issues (fixes issue 584,
|
||||
thanks to Simon Holywell!)
|
||||
|
||||
# InDefero 1.3.3 - xxx xxx xx xx:xx 2012 UTC
|
||||
|
||||
**ATTENTION**: InDefero needs Pluf [a45dc195](http://projects.ceondo.com/p/pluf/source/commit/a45dc195)
|
||||
or newer to run properly!
|
||||
|
||||
## Bugfixes
|
||||
|
||||
- If an anonymous or authenticated user had no access to any project in a
|
||||
forge, all projects were listed for him (but still no one was actually
|
||||
accessible). This has been fixed.
|
||||
|
||||
- Fixed a problem where the SyncGit plugin doesn't properly updates the
|
||||
authorized_keys file when the public key data contained slashes (thanks
|
||||
to Simon Gareste for the fix!)
|
||||
|
||||
- Under PostgreSQL indefero could not be set up because of a circular
|
||||
foreign key dependency. This has been fixed (issue 800).
|
||||
|
||||
- Under PostgreSQL new projects could not be created due to a failing
|
||||
foreign key relation. Adding project tags was not possible for a similar
|
||||
reason. This has been fixed (issue 800, continued).
|
||||
|
||||
# InDefero 1.3.2 - Wed May 09 20:05 2012 UTC
|
||||
|
||||
## Bugfixes
|
||||
|
@ -37,6 +37,7 @@ function IDF_Migrations_25NullableProjectInTag_up($params=null)
|
||||
|
||||
function IDF_Migrations_25NullableProjectInTag_down($params=null)
|
||||
{
|
||||
$engine = Pluf::f('db_engine');
|
||||
$db = Pluf::db();
|
||||
if ($engine === 'PostgreSQL') {
|
||||
$db->execute('ALTER TABLE '.$db->pfx.'idf_tags ALTER COLUMN project SET NOT NULL');
|
||||
|
46
src/IDF/Migrations/26NullableActivityInProject.php
Normal file
46
src/IDF/Migrations/26NullableActivityInProject.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-2012 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_26NullableActivityInProject_up($params=null)
|
||||
{
|
||||
$engine = Pluf::f('db_engine');
|
||||
$db = Pluf::db();
|
||||
if ($engine === 'PostgreSQL') {
|
||||
$db->execute('ALTER TABLE '.$db->pfx.'idf_projects ALTER COLUMN current_activity DROP NOT NULL');
|
||||
} else if ($engine === 'MySQL') {
|
||||
$db->execute('ALTER TABLE '.$db->pfx.'idf_projects MODIFY current_activity MEDIUMINT NULL');
|
||||
// this is only needed for non-transactional setups where MySQL set 0 as default value
|
||||
$db->execute('UPDATE '.$db->pfx.'idf_projects SET current_activity=NULL WHERE current_activity=0');
|
||||
}
|
||||
}
|
||||
|
||||
function IDF_Migrations_26NullableActivityInProject_down($params=null)
|
||||
{
|
||||
$engine = Pluf::f('db_engine');
|
||||
$db = Pluf::db();
|
||||
if ($engine === 'PostgreSQL') {
|
||||
$db->execute('ALTER TABLE '.$db->pfx.'idf_projects ALTER COLUMN current_activity SET NOT NULL');
|
||||
} else if ($engine === 'MySQL') {
|
||||
$db->execute('ALTER TABLE '.$db->pfx.'idf_projects MODIFY current_activity MEDIUMINT NOT NULL');
|
||||
}
|
||||
}
|
@ -25,7 +25,7 @@
|
||||
* Add the private column for the project.
|
||||
*/
|
||||
|
||||
function IDF_Migrations_26IssueDueDate_up($params=null)
|
||||
function IDF_Migrations_27IssueDueDate_up($params=null)
|
||||
{
|
||||
$table = Pluf::factory('IDF_Issue')->getSqlTable();
|
||||
$sql = array();
|
||||
@ -39,7 +39,7 @@ function IDF_Migrations_26IssueDueDate_up($params=null)
|
||||
$db->execute($sql[$engine]);
|
||||
}
|
||||
|
||||
function IDF_Migrations_26IssueDueDate_down($params=null)
|
||||
function IDF_Migrations_27IssueDueDate_down($params=null)
|
||||
{
|
||||
$table = Pluf::factory('IDF_Issue')->getSqlTable();
|
||||
$sql = array();
|
@ -119,5 +119,9 @@ function IDF_Migrations_Backup_restore($folder, $name)
|
||||
foreach ($full_data as $model => $data) {
|
||||
Pluf_Test_Fixture::load($data, false);
|
||||
}
|
||||
foreach ($models as $model) {
|
||||
$schema->model = new $model();
|
||||
$schema->createConstraints();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -62,6 +62,10 @@ function IDF_Migrations_Install_setup($params=null)
|
||||
$schema->model = new $model();
|
||||
$schema->createTables();
|
||||
}
|
||||
foreach ($models as $model) {
|
||||
$schema->model = new $model();
|
||||
$schema->createConstraints();
|
||||
}
|
||||
// Install the permissions
|
||||
$perm = new Pluf_Permission();
|
||||
$perm->name = 'Project membership';
|
||||
@ -120,6 +124,10 @@ function IDF_Migrations_Install_teardown($params=null)
|
||||
);
|
||||
$db = Pluf::db();
|
||||
$schema = new Pluf_DB_Schema($db);
|
||||
foreach ($models as $model) {
|
||||
$schema->model = new $model();
|
||||
$schema->dropConstraints();
|
||||
}
|
||||
foreach ($models as $model) {
|
||||
$schema->model = new $model();
|
||||
$schema->dropTables();
|
||||
|
@ -64,7 +64,7 @@ class IDF_Plugin_SyncGit_Cron
|
||||
// We update only the part of the file between IDF_START / IDF_END comment
|
||||
$original_keys = file_get_contents($authorized_keys);
|
||||
if (strstr($original_keys, "# indefero start") && strstr($original_keys, "# indefero end")) {
|
||||
$out = preg_replace('/(#\sindefero\sstart).+(#\sindefero\send\s\s?)/isU',
|
||||
$out = preg_replace('%(#\sindefero\sstart).+(#\sindefero\send\s\s?)%isU',
|
||||
$out, $original_keys);
|
||||
} else {
|
||||
$out .= $original_keys;
|
||||
|
@ -105,6 +105,8 @@ class IDF_Project extends Pluf_Model
|
||||
'type' => 'Pluf_DB_Field_Foreignkey',
|
||||
'model' => 'IDF_ProjectActivity',
|
||||
'blank' => true,
|
||||
'is_null' => true,
|
||||
'default' => null,
|
||||
'verbose' => __('current project activity'),
|
||||
),
|
||||
);
|
||||
|
@ -50,6 +50,7 @@ class IDF_Tag extends Pluf_Model
|
||||
'model' => 'IDF_Project',
|
||||
'blank' => true,
|
||||
'is_null' => true,
|
||||
'default' => null,
|
||||
'verbose' => __('project'),
|
||||
),
|
||||
'class' =>
|
||||
|
@ -443,10 +443,12 @@ class IDF_Views
|
||||
}
|
||||
|
||||
$projectIds = self::getUserVisibleProjectIds($user);
|
||||
if (count($projectIds) > 0) {
|
||||
$sql->SAnd(new Pluf_SQL(sprintf($db->pfx.'idf_projects.id IN (%s)', implode(', ', $projectIds))));
|
||||
if (count($projectIds) == 0) {
|
||||
return new ArrayObject();
|
||||
}
|
||||
|
||||
$sql->SAnd(new Pluf_SQL(sprintf($db->pfx.'idf_projects.id IN (%s)', implode(', ', $projectIds))));
|
||||
|
||||
$orderTypes = array(
|
||||
'name' => 'name ASC',
|
||||
'activity' => 'value DESC, name ASC',
|
||||
@ -470,10 +472,12 @@ class IDF_Views
|
||||
$sql = new Pluf_SQL('project IS NULL');
|
||||
|
||||
$projectIds = self::getUserVisibleProjectIds($user);
|
||||
if (count($projectIds) > 0) {
|
||||
$sql->SAnd(new Pluf_SQL(sprintf('idf_project_id IN (%s)', implode(', ', $projectIds))));
|
||||
if (count($projectIds) == 0) {
|
||||
return new ArrayObject();
|
||||
}
|
||||
|
||||
$sql->SAnd(new Pluf_SQL(sprintf('idf_project_id IN (%s)', implode(', ', $projectIds))));
|
||||
|
||||
$tagList = Pluf::factory('IDF_Tag')->getList(array(
|
||||
'filter' => $sql->gen(),
|
||||
'view' => 'join_projects',
|
||||
|
Loading…
Reference in New Issue
Block a user