Redmine 2.x compatibility patch

Hi there!

This is a big compatibility patch. 
With this one Redmine Git Hosting is now fully compatible with Redmine 2.x :)