Merged r13592, r13594, r13599 (#18349).

git-svn-id: http://svn.redmine.org/redmine/branches/2.6-stable@13632 e93f8b46-1217-0410-a6f0-8f06a7374b81
Merged r13477 (#18051).

git-svn-id: http://svn.redmine.org/redmine/branches/2.6-stable@13633 e93f8b46-1217-0410-a6f0-8f06a7374b81
Merged r13593 (#17705).

git-svn-id: http://svn.redmine.org/redmine/branches/2.6-stable@13634 e93f8b46-1217-0410-a6f0-8f06a7374b81
Merged r13486 to r13489 and r13492 (#8817).

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