Update ADOdb to v5.17 (released 17-May-2012)

Changes vs upstream release[1]:

 - removed following dirs and files:
   contrib/ cute_icons_for_site/ docs/ pear/ tests/ server.php
 - converted CRLF to LF
 - trimmed trailing whitespace

[1] http://phplens.com/lens/lensforum/msgs.php?id=19169

Fixes #13713
ADOdb pgsql fix: AlterColumnSQL conversion from bool to int

When changing type of a column from boolean to integer, PostgreSQL does
not provide implicit type cast, so the library needs to specify it via
USING statement when generating the SQL·

Porting part b) of commit 10871e5afc0bffc546b1a3d60bd7a459fa37e762

This issue exists in ADOdb <= 5.17. Upstream bug report
http://phplens.com/lens/lensforum/msgs.php?id=19204

Fixes #14398
ADOdb pgsql fix: AlterColumnSQL incorrect SQL generated

Fixes behavior on PostgreSQL, where the schema.php upgrade step

$dict->AlterColumnSQL('mantis_user_pref_table', "redirect_delay I
NOTNULL DEFAULT 0" ) );

Generates incorrect SQL:

ALTER TABLE mantis_user_pref_table ALTER COLUMN INTEGER SET NOT NULL
ERROR: column "integer" of relation "mantis_user_pref_table" does not
exist

Porting part a) of commit 10871e5afc0bffc546b1a3d60bd7a459fa37e762

This issue exists in ADOdb <= 5.17. Upstream bug report
http://phplens.com/lens/lensforum/msgs.php?id=19202

Fixes #14398
ADOdb pgsql fix: system warning sprintf(): Too few arguments error

Upstream bug report http://phplens.com/lens/lensforum/msgs.php?id=19186
ADOdb pgsql fix: Allow Quoted Default Values in DataDict

Allows definition of defaults e.g. timestamps

Upstream bug report
http://phplens.com/lens/lensforum/msgs.php?id=17397

Porting commit 156910b5dea81fe234be37695fca926f6490fb9d by Paul Richards

Fixes #14398
Fix install_category_migrate() function for PostgreSQL

With PostgreSQL, the function was throwing a warning due calling
db_query_bound() with mismatched number of parameters to the query.

It was not an issue for other DB's where the parameters are not
positional.
Fix PostgreSQL error when adding project/subproject (schema change)

The error is caused by columns mantis_project_table.inherit_global and
mantis_project_hierarchy_table.inherit_parent, which are defined as
unsigned int in schema.php, but treated as boolean in the code. This is
a problem with PostgreSQL due to strict type checking, but not on MySQL
as type cast is done automatically.

Changes in schema.php the type for the 2 fields project.inherit_global
and project_hierarchy.inherit_parent from Integer to Boolean

Fixes #14385
ADOdb pgsql fix: AlterColumnSQL conversion from int to bool

When changing type of a column from integer to boolean, PostgreSQL does
not provide implicit type cast, so the library needs to specify it via
USING statement when generating the SQL·

Reverse problem of 3fc6200386a975a204f6951acba4067b40ecabd0

This issue exists in ADOdb <= 5.17. Upstream bug report
http://phplens.com/lens/lensforum/msgs.php?id=19204
Revised code and additional fixes from John Lim
John Lim's reverted changes

Code optimization / consistency update by dregad were reverted to
original state - e-mail sent to John on 30-Aug-2012 to ask why
Fix #13304: Error handler causes XML Parsing Errors

The standard error handler was generating invalid HTML, due to not
outputting previously issued page headers.

To fix this issue, we retrieve the output buffer's contents, and retain
all html up to the </head> tag (not included).

A few layout changes were applied as well, to make better use of
screen real estate so that the error page is easier to read, especially
when $g_show_detailed_errors is ON.
Revert "Issue #12545: Enforce XHTML strict output for all pages served"

This reverts commit 4fc1d8b8290872e660c6d9a179c4c2209adf7e26.

Fixes #13304, #14759, #15446

Conflicts:

	core/http_api.php
Fix #16025: Change DOCTYPE to HTML5

As discussed in mailing list [1]

[1] http://article.gmane.org/gmane.comp.bug-tracking.mantis.devel/4468
Admin check (PHP): ignore disabled pcntl_* functions

As per PHP documentation, Process Control functions should be disabled
within a web server environment, and therefore should not pop up as
warnings.

Fixes #16035
Admin checks (Paths): remove 'scripts' from developers dirs

This directory is not for development use, it contains server back-end
scripts, e.g. to send e-mails via cron.

Fixes #16035
Make db_get_table() backwards-compatible with 1.2

Issue #10914 changed the way db_get_table() generates the physical
table name, as well as the function's input parameter ('TABLENAME' vs
'mantis_TABLENAME_table'). This change broke the API, forcing all
plugins to be adapted.

In order to minimize the impact on plugin maintainers, the function
now accepts both the old and the new style parameter.

Fixes #16038
Trigger warning when using old-style db_get_table()

Follow-up commit on fix to issue #16038, a warning is triggered to
inform user that deprecated functionality is being used, encouraging
plugin developers to update their code.
Fix #16039: Login page causes error in web server log

Regression introduced by 564f92a02ff738645d68b6e7f5ace1009b5c5f9f.

Dynamic CSS 'status_config.php' page now exits without generating any
stylesheets when called from login_page.php (status colors are not
needed there anyway).
Issue #16038: improve performance

Use strpos+substr instead of preg_match.
sed script to convert language files back to 1.2 format

Execute with sed -r -f convert.sed -i lang/strings_*.txt