Don't send notif mail when updating Protected account's Access Level

Prior to this, Mantis would effectively not update the protected user
account's 'Access Level' field, but would still send a notification to
the user informing them that the field was modified, causing confusion.

The confirmation message for protected account update was reworded.

Fixes #15247
Reworded PHPdoc email_send_all() function description
Make email_send_all() send older queued messages first

To achieve this, a new optional parameter was added to function
email_queue_get_ids() to specify the desired sort order (defaults to
'DESC' to ensure no change in behavior).

email_send_all() now retrieves the list of emails to send in ascending
order.

Fixes #15248
Remove unnecessary assignment

Commit 361089d2a2f8b85e178de315046916ea26836e92 omitted to remove the
old default value for $g_set_status_threshold.
Localisation updates from http://translatewiki.net.
Enable filter date fields by default when $g_use_javascript = OFF

With javascript disabled, when ticking 'use date filters' checkbox in
view issues page, the associated selection fields to pick the date
criteria remain disabled, preventing date filtering.

The code now detects the state of $g_use_javascript and sets the
'disabled' state of the date selection fields accordingly.

Also removes 'Undefined variables' system notices.

Fixes #15255
Fix inconsistent use of numeric vs text month in date filter

The selection list now uses full-text months consistently across the
filter page

Fixes #15257
access_get_status_threshold() returns incorrect value for NEW

When the user's access level is below $g_update_bug_status_threshold and
the status to change to is NEW, the function returned the incorrect
access level, preventing user from accessing the target status when
updating bugs, even though the workflow permits it.

This commit fixes the problem by introducing special handling for NEW
status ('bug_submit_status'), in which case the function returns
'report_bug_threshold' otherwise it falls back to default
'update_bug_status_threshold'.

Fixes #15260, affects issue #15258
Prevent reporters from changing issue status to 'new'

Due to a missing access level check in html_button_bug_update(), in some
cases reporters had access to the 'Change Status To' button, which could
let them change an existing issue's status to 'new' (even if not their
own issue).

The code now checks that the user has at least 'update_bug_threshold'
permissions to display the button.

Fixes #15258
Fix custom_field_get_id_from_name() always returning false

Commit 6a7db3403d42cf58e8c5ebb50b60a7c090906c36 introduced an error in
the call to db_query_bound(), passing the param as a scalar value
instead of an array.

Thanks to user nimmich for noticing the issue and providing a patch.

Fixes #15264
Cache obsolete custom field names

If a custom field name changed, custom_field_get_id_from_name() keeps
asking the database for an id over and over again (e.g. for every
change of the field in the bug history) to decide if it should be
displayed.

Thanks to user nimmich for noticing the issue and providing a patch.

Fixes #15265
Localisation updates from http://translatewiki.net.
Make username in Manage Projects page a link to edit user

Fixes #3693
Manage columns include: rename form and remove multipart encoding

The form in manage_columns_inc.php was apparently copy-pasted from
bug_report_page.php; it was named "report_bug_form" and an optional
multipart encoding if file upload is enabled, which does not make sense
in this context.

This code-cleanup commit removes the enctype and renames the form.

Fixes #15280

Signed-off-by: Damien Regad <damien.regad@merckgroup.com>
Show all users in assign filter when ALL PROJECTS is selected

Fixes #10130

Signed-off-by: Damien Regad <damien.regad@merckgroup.com>
Optimise code in print_user_option_list()

Improve performance of code building the list of users for all projects
introduced in commit 21746dd1a6a7e4c6df8baa9cbfc3dac48c82899c.

By using an associative array, the foreach loop to remove duplicates can
be simplified (no need for an if statement) and we can also remove the
current user from the list more easily.

Affects issue #10130
Removing current user from list built by print_user_option_list()

Since there is a [myself] value in the list, the current user should be
removed. This was done for ALL_PROJECTS with the fix for issue #10130,
but the single-project code still listed the current user.

By moving the code to remove the current user to the foreach loop that
builds the sort arrays, we ensure that it is removed in both cases.
Do not remove current user from list

As mentioned by atrol in issue #10130, removing the current user causes
potential loss of functionality when using filters because [myself]
(handler_id = -1) is not the same as a specific handler_id.

This is a partial revert of 748c4cec6457475673f21ad554ba1791c90222c7.
fix #14559 - Filter for adm_report_config.php

Signed-off-by: Damien Regad <damien.regad@merckgroup.com>
Issue #14559: improve adm_report_config.php filter

The following changes were made

- revised UI to make it more similar to the issues filter
- make use of existing constants and language strings
- filter defaults to All Users / All Projects / All options which avoids
  performance issues in installations having a large number of entries
  in the config table (workaround for issue #13680)
- filter form uses post instead of get method
- comply to coding guidelines