return true if operation was succesful

This commit is contained in:
Uwe Steinmann 2019-02-11 19:20:07 +01:00
parent 90f4c17533
commit 07d7bb0834

View File

@ -38,6 +38,7 @@ class SeedDMS_Controller_Download extends SeedDMS_Controller_Common {
sendFile($dms->contentDir . $content->getPath());
}
}
return true;
} /* }}} */
public function file() { /* {{{ */
@ -55,6 +56,7 @@ class SeedDMS_Controller_Download extends SeedDMS_Controller_Common {
sendFile($dms->contentDir . $file->getPath());
}
}
return true;
} /* }}} */
public function archive() { /* {{{ */
@ -75,6 +77,7 @@ class SeedDMS_Controller_Download extends SeedDMS_Controller_Common {
sendFile($basedir .$filename );
}
}
return true;
} /* }}} */
public function log() { /* {{{ */
@ -94,6 +97,7 @@ class SeedDMS_Controller_Download extends SeedDMS_Controller_Common {
sendFile($basedir.$filename);
}
}
return true;
} /* }}} */
public function sqldump() { /* {{{ */
@ -113,6 +117,7 @@ class SeedDMS_Controller_Download extends SeedDMS_Controller_Common {
sendFile($basedir.$filename);
}
}
return true;
} /* }}} */
public function approval() { /* {{{ */
@ -123,7 +128,7 @@ class SeedDMS_Controller_Download extends SeedDMS_Controller_Common {
$filename = $dms->contentDir . $document->getDir().'a'.$logid;
if (!file_exists($filename) ) {
$this->error = 1;
return;
return false;
}
if(null === $this->callHook('approval')) {
@ -137,6 +142,7 @@ class SeedDMS_Controller_Download extends SeedDMS_Controller_Common {
header("Cache-Control: must-revalidate");
sendFile($filename);
}
return true;
} /* }}} */
public function review() { /* {{{ */
@ -147,7 +153,7 @@ class SeedDMS_Controller_Download extends SeedDMS_Controller_Common {
$filename = $dms->contentDir . $document->getDir().'r'.$logid;
if (!file_exists($filename) ) {
$this->error = 1;
return;
return false;
}
if(null === $this->callHook('review')) {
@ -181,25 +187,25 @@ class SeedDMS_Controller_Download extends SeedDMS_Controller_Common {
$this->params['content'] = $content;
switch($type) {
case "version":
$this->version();
return $this->version();
break;
case "file":
$this->file();
return $this->file();
break;
case "archive":
$this->archive();
return $this->archive();
break;
case "log":
$this->log();
return $this->log();
break;
case "sqldump":
$this->sqldump();
return $this->sqldump();
break;
case "approval":
$this->approval();
return $this->approval();
break;
case "review":
$this->review();
return $this->review();
break;
}
} /* }}} */