Merged r13040 (#16467).

git-svn-id: http://svn.redmine.org/redmine/branches/2.4-stable@13045 e93f8b46-1217-0410-a6f0-8f06a7374b81
Merged r13041 (#16511).

git-svn-id: http://svn.redmine.org/redmine/branches/2.4-stable@13047 e93f8b46-1217-0410-a6f0-8f06a7374b81