Fix #14418: Alternate text for logo image is hardcoded
Fix #14420: system warning in make_captcha

Per PHP documentation [1], second param of imagejpeg() should be set to
null to output the image directly.

Thanks to Andrew Kovalenko for noticing and providing fix for the issue

[1] http://php.net/imagejpeg
Fix #11687: use of incorrect error constant
SOAP API: calling mc_issue_update unduly updated bugnotes

History shows 'Note View State changed' even though it has not been
modified, and if time tracking is enabled the bugnote's last_updated
date is changed.

This was caused by a type-strict comparison of the value returned by the
api (string) to an integer.

Fixes #14412
LDAP binding calls are made even if $g_login_method <> LDAP

If for some reason $g_use_ldap_email or $g_use_ldap_realname are ON with
$g_login_method <> 'LDAP', binding calls are attempted when retrieving
the user's e-mail or real name.

Adding a check on $g_login_method to avoid this unwanted behavior.

Fixes #14442
Fix system warning in html_status_legend() with custom status

When using custom status for which no language strings are defined,
html_status_legend() triggered system warnings.

MantisBT now displays the custom status' name as defined in the enum,
in case there is no available translation string.

Fixes #14446
Fix email validation regex rejects addresses with single subdomain

Per RFC 5322, e.g. user@localhost is a valid e-mail address but the
previously implemented regex rejected it.

Fixes #14453
Fix #14448: 'Undefined index: jpg' in '.../core/file_api.php'
Custom field validation should pass when empty and min length > 0

Fix for #12029 (commit dd286bf898f3e9ee330f7c4512cf5ca9437d521e)
introduced a regression in the validation of numeric custom fields when
the field's minimum length is greater than 0 and the data being
validated is empty. This prevents e.g. reporting of new issues with a
hidden custom field, or updating issues having a non-required, empty
field.

This commit resolves the problem by passing validation when the field is
empty. This should not cause problems for required fields, as that case
is covered by an earlier check in bug_report.php and bug_update.php.

Fixes #14516
Fix #14192: Add Exchange header for automessage
Fix long URL formatting causing bugnote/text to be blank

When MantisCoreFormatting plugin processes text (e.g. bugnote)
containing a long URL, a PREG_BACKTRACK_LIMIT_ERROR may occur in
string_insert_hrefs() when replacing email address links with
preg_replace_callback(). When pcre.backtrack_limit = 100000, the longest
URL that can be processed successfully is 152 chars. A bigger URL
triggers the PCRE error and the function returns NULL.

This was introduced by commit 01b5bf55a1dae4225a083cca16edf208bb10c4b1.

We now use preg_split() instead of preg_replace_callback(), which is
more efficient and avoids the backtrace error issue

The url replacement string was also moved to a variable to make code
more readable.

Fixes #14447
Email hrefs in bugnotes should include 'mailto:' prefix

Hyperlinks to email addresses generated when processing bugnotes and
description fields should include the 'mailto:' prefix if it exists

Fixes #14547
Documentation: improve troubleshooting for error 1502
Fix new signup user is protected account on PostgreSQL

This fixes a regression introduced with resolution of #14288 (see commit
b8d4b5039598248d0b0c78619450c51d4dc98df2)

The user_create() function was not properly resetting the account's
protected flag to false due to specific handling of Boolean type as a
string for PostgreSQL.

Fixes #14466
Fix #14550: Incorrect values for date_order field when using
mc_project_version_add()
Fix #14550: Incorrect values for date_order field when using
mc_project_version_add()

Fix double key in VersionTest ( thanks to atrol ).
Renaming EVENT_BUG_CHANGE_STATUS_FORM to EVENT_UPDATE_BUG_STATUS_FORM

This is per jreese's recommendation, for consistency with existing
events names.

Fixes #14329, see also #10126
Fix #14552: Update admin checks to make sure ADOdb extension is not used
api soap: correct usage of bugnote_set_view_state

Fixes #14573: Updating an issue's view state always sets it to private 

Conflicts:
	tests/soap/IssueNoteTest.php
Fix #14574: MSSQL server 2005 as minimum version