modified to work with Redmine 2.x

I modified to work with Redmine 2.x.