MantisBT: master-1.2.x ba71cf96

Author Committer Branch Timestamp Parent
dregad dregad master-1.2.x 2012-06-18 02:52 master-1.2.x 1b79a041
Affected Issues  0014288: Manage User not reachable due to error in PostgreSQL
 0014385: Impossible to create a new project with fresh install on PostgreSQL
Changeset

Fix PostgreSQL error when adding project/subproject

Release 1.2.11 (see commit b8d4b5039598248d0b0c78619450c51d4dc98df2 and
issue 0014288) introduced a regression preventing the user from creating
a new project or adding a subproject.

The error is caused by columns mantis_project_table.inherit_global and
mantis_project_hierarchy_table.inherit_parent, which are defined as
unsigned int in schema.php, but treated as boolean in the code. This is
a problem with PostgreSQL due to strict type checking, but not on MySQL
as type cast is done automatically.

This commit is a workaround for the problem (sending an int to the DB
instead of a bool if using PostgreSQL), as fixing the root cause would
require a schema change which is not possible in 1.2.x.

Fixes 0014385

mod - core/project_api.php Diff File
mod - core/project_hierarchy_api.php Diff File