mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-14 21:51:32 +00:00
return true if operation was succesful
This commit is contained in:
parent
90f4c17533
commit
07d7bb0834
|
@ -38,6 +38,7 @@ class SeedDMS_Controller_Download extends SeedDMS_Controller_Common {
|
||||||
sendFile($dms->contentDir . $content->getPath());
|
sendFile($dms->contentDir . $content->getPath());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
public function file() { /* {{{ */
|
public function file() { /* {{{ */
|
||||||
|
@ -55,6 +56,7 @@ class SeedDMS_Controller_Download extends SeedDMS_Controller_Common {
|
||||||
sendFile($dms->contentDir . $file->getPath());
|
sendFile($dms->contentDir . $file->getPath());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
public function archive() { /* {{{ */
|
public function archive() { /* {{{ */
|
||||||
|
@ -75,6 +77,7 @@ class SeedDMS_Controller_Download extends SeedDMS_Controller_Common {
|
||||||
sendFile($basedir .$filename );
|
sendFile($basedir .$filename );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
public function log() { /* {{{ */
|
public function log() { /* {{{ */
|
||||||
|
@ -94,6 +97,7 @@ class SeedDMS_Controller_Download extends SeedDMS_Controller_Common {
|
||||||
sendFile($basedir.$filename);
|
sendFile($basedir.$filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
public function sqldump() { /* {{{ */
|
public function sqldump() { /* {{{ */
|
||||||
|
@ -113,6 +117,7 @@ class SeedDMS_Controller_Download extends SeedDMS_Controller_Common {
|
||||||
sendFile($basedir.$filename);
|
sendFile($basedir.$filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
public function approval() { /* {{{ */
|
public function approval() { /* {{{ */
|
||||||
|
@ -123,7 +128,7 @@ class SeedDMS_Controller_Download extends SeedDMS_Controller_Common {
|
||||||
$filename = $dms->contentDir . $document->getDir().'a'.$logid;
|
$filename = $dms->contentDir . $document->getDir().'a'.$logid;
|
||||||
if (!file_exists($filename) ) {
|
if (!file_exists($filename) ) {
|
||||||
$this->error = 1;
|
$this->error = 1;
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(null === $this->callHook('approval')) {
|
if(null === $this->callHook('approval')) {
|
||||||
|
@ -137,6 +142,7 @@ class SeedDMS_Controller_Download extends SeedDMS_Controller_Common {
|
||||||
header("Cache-Control: must-revalidate");
|
header("Cache-Control: must-revalidate");
|
||||||
sendFile($filename);
|
sendFile($filename);
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
public function review() { /* {{{ */
|
public function review() { /* {{{ */
|
||||||
|
@ -147,7 +153,7 @@ class SeedDMS_Controller_Download extends SeedDMS_Controller_Common {
|
||||||
$filename = $dms->contentDir . $document->getDir().'r'.$logid;
|
$filename = $dms->contentDir . $document->getDir().'r'.$logid;
|
||||||
if (!file_exists($filename) ) {
|
if (!file_exists($filename) ) {
|
||||||
$this->error = 1;
|
$this->error = 1;
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(null === $this->callHook('review')) {
|
if(null === $this->callHook('review')) {
|
||||||
|
@ -181,25 +187,25 @@ class SeedDMS_Controller_Download extends SeedDMS_Controller_Common {
|
||||||
$this->params['content'] = $content;
|
$this->params['content'] = $content;
|
||||||
switch($type) {
|
switch($type) {
|
||||||
case "version":
|
case "version":
|
||||||
$this->version();
|
return $this->version();
|
||||||
break;
|
break;
|
||||||
case "file":
|
case "file":
|
||||||
$this->file();
|
return $this->file();
|
||||||
break;
|
break;
|
||||||
case "archive":
|
case "archive":
|
||||||
$this->archive();
|
return $this->archive();
|
||||||
break;
|
break;
|
||||||
case "log":
|
case "log":
|
||||||
$this->log();
|
return $this->log();
|
||||||
break;
|
break;
|
||||||
case "sqldump":
|
case "sqldump":
|
||||||
$this->sqldump();
|
return $this->sqldump();
|
||||||
break;
|
break;
|
||||||
case "approval":
|
case "approval":
|
||||||
$this->approval();
|
return $this->approval();
|
||||||
break;
|
break;
|
||||||
case "review":
|
case "review":
|
||||||
$this->review();
|
return $this->review();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user