Squashed commit of the following:

commit 7fd1ff12a58b2445f155cf230162f89d33866da7
Author: Marc Bonsels <marc.bonsels@otrs.com>
Date:   Thu Jun 13 15:43:59 2013 +0200

    Added tree selection also to stats.