Ensure all PHPUnit tests are executed on Travis

Fixes #17229

Signed-off-by: Damien Regad <dregad@mantisbt.org>
Fix config file location
Add comment to document added configs' purpose
Enable all tests on Travis

Fixes #17229, https://github.com/mantisbt/mantisbt/pull/165
Fix graph display in advanced summary with MSSQL

Graph « Cumulative by date » is not displayed in Summary > Advanced
Summary, SQL Server complains that it cannot convert varchar to int.

Fixes #17011, https://github.com/mantisbt/mantisbt/pull/142

Signed-off-by: Damien Regad <dregad@mantisbt.org>
Localisation updates from https://translatewiki.net.
Fix double use of db_result() bug when assigning handlers
Fixes #17411, #17412 for empty changelog/roadmap

This change provides the user with a message that explains why the change log or roadmap pages are empty.

- Changelog message wasn't explaining what is going on.
- Changelog message wasn't showing when there were no issues, only when there were no projects.
- Changelog message formatting was using page title style.
- Roadmap had no messages.
- Roadmap had a variable to check usage that wasn't being used.

Now we show a different message based on whether the user is manager (hence can create versions)
or a regular user.

Conflicts:
	changelog_page.php
Code Standards/PHP Doc improvements

Improvements to code base to follow coding standards,
and improve phpdoc validation from PHP Codesniffer rules
Fix syntax error
Simplify code and fix system notice in Timeline

Notice was triggered when avatars are disabled due to a strict-type
comparison (array() !== false).

Fixes #17492
Fix 'Undefined index: _stats' notice in bug API

This is a regression introduced by a change in filter API by commit
5458f7020999317b35f403fa2a0e477d6182ec12. In filter_cache_result(), the
2nd param to bug_cache_database_result() was changed from 'false' to
default (null). Consequently the '_stats' element was no longer present,
triggering the notice.

Problem solved by relying on array_key_exists() instead of is_null() to
check for the '_stats' array element.

Fixes #17494
Detect and block conflicting edits

Fixes the (oh so old) issue on the MantisBT site #5466, whereby
concurrent edits to a single issue can overwrite field data.

These changes allow MantisBT to spot a conflicting edit, stopping
it from overwriting the first edit with the second. It's very much
a blunt tool (flat-out refusal to save), but it works.

Signed-off-by: Damien Regad <dregad@mantisbt.org>

- Error message revised as discussed in the pull request
- Squashed commits

Fixes #5466, PR https://github.com/mantisbt/mantisbt/pull/212
Fix invalid enumeration string value display

Prior to this, an invalid enumeration string value (e.g. @32@) was
displayed if the corresponding localized value did not exist.

This allows fallback to English language for individual enum elements.

Fixes #16975, https://github.com/mantisbt/mantisbt/pull/198

Signed-off-by: Damien Regad <dregad@mantisbt.org>
Logging API: fix array to string conversion notice

log_event() used $p_msg to print the message, instead of the sanitized
$s_msg variable, so when logging DB events which are submitted as an
array with execution time, the notice gets triggered.

Regression introduced by 2d0df25ec0fc7d9a0d97c8e5e102b617e5ff96d9

Fixes #17441
Logging API: fix FirePHP output

FirePHP::log() performs formatting of complex variable types and
provides a popup window to inspect them, so we pass it the raw message
instead of formatting it ourselves.
Revert use of (bool) typecast

Commit 5458f7020999317b35f403fa2a0e477d6182ec12 replaced several
occurences of db_prepare_bool() by (bool) typecasts. This breaks
compatibility with PostgreSQL, which requires special handling for
BOOLEAN columns.
Consistently use db_prepare_bool() for boolean columns

In Version API, the released column was treated as an integer, despite
the fact that it's defined as 'L' in the schema. This can cause problems
with PostgreSQL.

Also fixes #17333, Oracle throwed an ORA-01400 error when adding a new
version (regression caused by a80f447687722b52160d00c96c21a5be5f4329e1,
which removed the call to db_prepare_bool()).
Update constants to be consistent with underlying db column type

We define constants VERSION_FUTURE = 0 and VERSION_RELEASED = 1
for use with project_version.released column. However, it is defined as
type 'L' which maps to boolean in some DB types.

To prevent errors caused by mismatched data types, the constants are now
using true/false. If we ever need to store more values, the column's
type should be changed to integer in the schema.
Fix handling of boolean columns for PostgreSQL