Whitespace fixes
Revised PHPdoc for file_add() function
Backport changes to file_add() function from master

Align with changes from 84017535f8718685d755d58af7a39d80f52ffca8
to ease future code maintenance.
Use bind variables in file_add() function

Use of db_query() in file_add() is causing issues on Oracle due to the
size of literal SQL statements being limited to 2000 chars: error
ORA-01704 occurs when attaching files with DB storage. To avoid the
problem, bind variables must be used.

We now call db_query_bound() instead of db_query(), and file_add() has
been refactored to remove usage of deprecated db_prepare_* functions.

Fixes #14563
Fix encoding of BLOB columns

The db_prepare_binary_string() function was designed for use with
db_query(), and therefore used to surround the binary string to
encode with single quotes.

Use of db_query_bound() with the function's return value would result in
a corrupted attachment because the quotes would be treated as integral
part of the binary data.

MySQL does not require any special encoding (except regular string
processing which is already done by db_query_bound()).

For PostgreSQL, instead of calling pg_escape_bytea() directly, we now
use ADOdb connection's BlobEncode() method.

MSSQL encoding was left as is was (no test platform available).

Based on documentation, Oracle (oci8) should not require any encoding
either, but was not tested either.

Fixes #12955
Move error checking code to beginning of file_add() function
SOAP API: align mci_file_add() with core file_add()

Most importantly, use bind variables (db_query_bound) and remove
deprecated db_prepare_* function calls.

A few other, minor changes were made to ensure mci_file_add() is as
similar as possible as the core file_add(), and the two functions behave
in a consistent way.
Whitespace fixes
SOAP tests: fix issue with testProjectAttachmentIsAdded()

The assertions for the project attachments are incorrect, as the rely on
there being no existing files, consequently the test fails if there are
any existing documents attached.

Added messages on assertions to facilitate troubleshooting.
Fix errors in mc_file_add()

SYSTEM NOTICE errors were detected by phpunit tests.
Remove calls to deprecated functions db_prepare* in "Docs" update page

Those calls cause the strings to be escaped twice : by db_prepare* and
then by db_query_bound, which leads to backslashes apparing in the
database.

All c_ prefixed variables have been removed as well, as there is no need
anymore for SQL cleaned variables.

Fixes #14541

Signed-off-by: Damien Regad <damien.regad@merckgroup.com>
Prototype for mc_project_get_issues_assigned_to() webservice method.
Commented new method in filter_api.php
Optimize user_get_all_accessible_projects()

On instances having a large number of projects, this function would
consume significant resources while processing all the subprojects to
determine if one is accessible to the user (about 25 seconds to load
main_page.php for 5'000 projects, without subprojects).

The performance bottleneck was the array_merge() call in the loop. This
has been replaced by a foreach working on an associative array. The same
page now loads under 1 second.

Fixes #9876
Support unassigned, reported by and monitored by.
Use case insensitive comparison for filter type and return only unresolved issues for assigned to filter.
Passed in user and project ids to config_get().
Fixed php error on my view page.
Added 10 test cases and a couple of minor fixes.
Added test case to make sure that assigned filter doesn't return resolved issues.