move code into switch statement

This commit is contained in:
Uwe Steinmann 2018-03-12 18:32:12 +01:00
parent bcdcfe2b43
commit 36e711f905

View File

@ -25,11 +25,10 @@ class SeedDMS_Controller_Download extends SeedDMS_Controller_Common {
public function run() {
$dms = $this->params['dms'];
$type = $this->params['type'];
$content = $this->params['content'];
switch($type) {
case "version":
$content = $this->params['content'];
if(null === $this->callHook('version')) {
if(file_exists($dms->contentDir . $content->getPath())) {
header("Content-Transfer-Encoding: binary");