Fix share download

fixes download issue introduced by https://github.com/owncloud/core/pull/10755

This is a fairly large change please test thoroughly as im sure we missed some cases
We should really start to use the appframework for any new development in core - here is how to use controllers http://doc.owncloud.org/server/7.0/developer_manual/app/controllers.html

THX