Fix #14014: Search number > 2147483647 fails on 64-bit systems

When a numeric search term is entered, the Filter API will only check
for matches in the bug and bugnote id fields when the search term is
within a valid range.

This was never an issue on 32-bit systems, but on 64-bit OS, PostgreSQL
throws an "integer out of range" error when executing the query because
the search term is cast to (int) and PHP_INT_MAX is greater than the
largest value allowed for the numeric DB fields (4-byte int, 2^31-1).

This issue does not exist on MySQL as the value is capped to the maximum
allowed; behavior was not tested on Oracle, DB2 or MSSQL.

The fix for PostgreSQL behavior is a hack, but I can't think of any
better solution (ideally, we should be able to query the DB for the
maximum allowed value for a field).
Add multiple file upload functionality

Adds a new option in config_defaults_inc.php (file_upload_max_num) to
determine how many files can be simultaneously uploaded.

Modifies the code in issue reporting and view details pages, to enable
the new functionality.

Fixes #5228
Fix whitespace and code alignment, removed useless code
Add multi-file upload to bug reporting page

Fixes #5228
I18l support for multi-file upload

Adds new strings to handle the plurals when uploading multiple files
(e.g. "Upload File" / "Upload Files") and conditionally display the
appropriate one depending on value of file_upload_max_num

Fixes #5228
Remove duplicate error code and message

There were two separate error constants defined, ERROR_DUPLICATE_FILE
and ERROR_FILE_DUPLICATE, corresponding to an error message string with
identical text.

This commit removes the redundant constant ERROR_DUPLICATE_FILE and the
corresponding error message.

Fixes #5228
Document g_file_upload_max_num in the administration guide

Affects #5228: Attaching multiple files in one go.
Removing previous checkins in preparation for 1.2.10.  Will re-do just before release.

Revert "Updated doc/RELEASE for 1.2.10."

This reverts commit a817c2cb10d5e26a7a5083f5ad1cce6168fddabf.
Revert "Update version to 1.2.10"

This reverts commit 1c1e04736ff5a6f57049cee5056fbad00392fba5.
Updated MantisTouch website url in the manual.
Fix utf8 offset when logging SQL in db_query_bound

The fix for #13280 (5835572fde9df4d0837f0105c6c44c75fe64c07c) only fixed
one part of the problem, i.e. when the UTF8 characters were in the SQL
query itself. This commit fixes the remaining case when the string
parameters contain multibyte chars.

Fixes #14097
Make index variable 0-based to optimize and make code more readable
Avoid unnecessary execution of query logging code

As per documentation for $g_show_queries_list, this option should only
be effective when $g_show_queries_count is ON. However, the global
variable $g_db_log_queries initialized in database_api.php did not
reflect this, which resulted in unnecessary execution of the logging
code in db_query_bound().
Fix #13785: Add filename and line number to system notices and warnings

Signed-off-by: Damien Regad <damien.regad@merckgroup.com>
Revert "Prevent selection of released version as target"

This reverts commit 3af57d289e46cf467bc30c8a094ce54af06eaf43.

The way this feature was implemented in release 1.2.9 introduced
regressions for several users.

Affects #11706
Fix #4465: Add config to disable 'save login' feature

To increase security, the administrator may want to prevent users from
using a 'permanent' cookie, thus forcing them to authenticate each time
they start a new session.

The new config option 'g_allow_permanent_cookie' enables this.
Documentation for new config $g_allow_permanent_cookie

Affects #4465
Add 'allow_permanent_cookie' to g_global_settings

Also reflowed the array definition to avoid long lines

Fixes #4465
Prevent setting permanent cookie using hand-crafted login.php

This commit prevents hand-crafted calls to login.php from setting a
permanent cookie when its use is disabled via allow_permanent_cookie
setting.

Thanks to Roland Becker for catching this.

Fixes #4465
PHPdoc and whitespace fixes in config_defaults_inc.php

Removed < > around pre in comment for g_wrap_in_preformatted_text,
causing syntax error when compiling PHPdoc.