Merged r4739 from trunk.
Merged r4700 from trunk.
Merged r4701 from trunk.
Merged r4727 and r4730 from trunk.
Merged r4741 and r4764 from trunk.
Merged r4677 from trunk.
Merged r4736 from trunk.
Merged r4761 from trunk.
Merged r4708 and r4709 from trunk.
Prevent error when Mantis version.date_order is nil (#7476).