Fix error in install_update_history_long_custom_fields

The following code snippet:

$t_query = 'SELECT name FROM ' . db_get_table('custom_field');;
$t_result = db_query_bound( $t_query );
$t_field = db_fetch_array( $t_result )  ;
var_dump($t_field);

Returns:
 array (size=1)
  'name' => string 'Fixed in Release' (length=16)

i.e. $t_field[0] is always NULL.

Upgrade schema queries should reference the field name.
Fix #0017605: Regression issue with upgrade step 184
Colours for project/global variables in manage pages should be in CSS.

This allows style to define a theme, as opposed to using a configuration
variable for something that will not normally be seen.

40f4e288db69afcaffb754a01c1077cb7d08ac4e
Fix database query in profile api
Merge branch 'profile_db'
Remove upgrade_warning that is not seen

Given that index.php directs people directly to install.php, and
that the upgrade "backup first" warning is only seen if you ignore
the warning telling you to update, and go to /admin and click a link,
that is only refers to mysql, and isn't localised...

...I think we can nuke this
Remove unneeded unset calls
Remove remaining references to wingraphviz

This is left over from 629a6760104e5f742ad54b5a765be78d4c42eef3
which removed wingraphviz in 2010
Shorten db_query_bound to db_query

We add a function "alias" for db_query_bound so that
existing code will continue to work.

We rename db_query_bound to db_query within mantis core.

Long term, this allows us to shorten db_query_bound() to a more sensible
db_query() call and to remove the function in 2.0 as it gives plugin
authors time to update their code and support both 1.3 and 2.0
XHTML/CSS validation and rendering fixes
Merge branch 'xhtml2'
html formatting
Fix E_RECOVERABLE_ERROR in event_api

Argument 3 passed to event_type_execute() must be of the type array,
integer given, called in /home/dregad/dev/mantisbt/core/event_api.php on
line 153 and defined

Regression introduced by 5458f7020999317b35f403fa2a0e477d6182ec12.
Follow up fix on af6c6e559b9b92d83c93fb5e6633e9c249da1f77.
Restore project selector's auto-switch behavior

The regression was caused by adding a div around the project selector
form (commit f28225acbe28cd04b3a94a3793dba4d969aeac7f) with the same id
as the child fieldset, so the jQuery selector in common.js could no
longer find the select or the button.

Assigning a different id to the div resolves the problem.

Fixes #17489
Optimize project selector auto-switch script

Simplify the jQuery code by making use of the affected elements' id
instead of a .children() call.
Plugin dependency fail with new Mantis release

If the plugin's minimum dependency for MantisCore is unspecified or
lower than the current release (i.e. the plugin does not specifically
list the current core version as supported) and the plugin does not
define a maximum dependency, we add one with the current version's minor
release (i.e. for 1.3.1 we would add '<1.3').

The purpose of this is to avoid compatibility issues by disabling
plugins which have not been updated for a new Mantis release; authors
have to revise their code (if necessary), and release a new version of
the plugin with updated dependencies.

Fixes #17360
Rename variables to improve code readability
Code optimization

The plugin's base name and cache will not change between iterations, so
we improve performance by moving $t_version_installed's initialization
outside of the foreach loop.
Coding guidelines
Make plugin dependency fail with new Mantis release

Pull Request #239