Whitespace fixes
Fix #9159: Added missing CSS 'button' class
Custom fields api - optimize and use db_query_bound

Replaces all uses of db_query() by db_query_bound() in the API.

Some SQL queries were rewritten in a cleaner and more efficient way.

custom_field_update() was greatly simplified by use of a foreach loop
instead of nearly identical code blocks for processing of each field to
update.

Fixes #14765, #14766
Don't display custom fields from disabled projects in view issues page

SQL for ALL_PROJECTS in custom_field_get_linked_ids() function was
modified to filter out disabled projects.

Thanks to vibe972 who originally submitted a patch for this on Github.
Original commit was rewritten due to changes made to the API.

Fixes #14764
Improve custom fields error messages

Introduce an additional 'Invalid Custom Field property' error message
that includes the name(s) of the properties which failed validation when
attempting to update the custom field.

Note: skip error message number 1305 to maintain forward-compatibility
with constants as they are defined in master branch

Fixes #14767
Use object properties instead of bug_get_field() calls
Whitespace fixes
Fix issue in tag api with odbc_mssql driver

This branch of code was put into place to handle a deficiency in the
odbc_mssql driver that doesn't allow for bound subqueries. This is not
needed for the other mssql drivers, yet using db_is_mssql() returns true
for all mssql drivers so code is indiscriminately executed for other
drivers.

$t_params[] init was changed because it only needs to be set once. It is
needed for the query in the mssql condition block for the first query
only to grab the list of tags that aren't specific to this bug.
Afterwards in the second query, $t_params needs to be null or it results
in the database returning an error due to no '?' replacements.
Therefore, after running the first query, we need to set this to null.
If the condition fails and the dbtype is not mssql (or 'odbc_mssql')
then $t_params is already set.

Note: the multiple query setup in the "true" condition is a really bad
way to do this. I'm not going to mess with it, however, since the tag
count probably won't get too high in any general scenario.

Fixes #14774

Signed-off-by: Damien Regad <damien.regad@merckgroup.com>

Note, this was simply checked for syntax errors and compliance with
coding guidelines as I don't have access to an MSSQL setup.
Fix XML error in adm_config_report.php

Regression introduced by 935c106f7657bacfdac1f3ad5641a9d55f6f3ca3.

Fixes #14756
Fix #13265: Issues count in Changelog

Prior to this, issues having multiple parents were counted more than
once, causing an incorrect count of issues to be reported (changelog
displayed the number of printed lines instead of the number of distinct
issues in the version)

This is an improvement over SL-Gundam's original patch, which did not
cover all cases.
Optimize and reformat code in changelog_page.php

- Remove unnecessary variable initializations
- Reformat SQL statement for better readability
- Simplify code displaying issue count
Change Log must consistently rely on fixed_in_version

Change Log used target_version instead of fixed_in_version to manage
issues' parent/child relationships. This caused unexpected behavior when
target version did not match fixed in version.

The SQL which retrieves the changelog issues now relies on
fixed_in_version.

Fixes #14788