Added Gantt Activity

This commit is contained in:
Deon George
2011-05-27 18:44:44 +10:00
parent d52b86214c
commit 6f38322009
14 changed files with 473 additions and 315 deletions

View File

@@ -251,9 +251,14 @@ abstract class Controller_lnApp_TemplateDefault extends Controller_Template {
// Remove the extension from the filename
$file = substr($file, 0, -(strlen($ext) + 1));
$f = '';
// If our file is pathed with session, our file is in our session.
if ($fd = Session::instance()->get_once($this->request->param('file'))) {
$this->response->body($fd);
// First try and find media files for the site_id
if ($f = Kohana::find_file(sprintf('media/%s',Config::siteid()), $file, $ext)) {
} elseif ($f = Kohana::find_file(sprintf('media/%s',Config::siteid()), $file, $ext)) {
// Send the file content as the response
$this->response->body(file_get_contents($f));
@@ -269,8 +274,8 @@ abstract class Controller_lnApp_TemplateDefault extends Controller_Template {
// Set the proper headers to allow caching
$this->response->headers('Content-Type',File::mime_by_ext($ext));
$this->response->headers('Content-Length',(string)filesize($f));
$this->response->headers('Last-Modified',date('r', filemtime($f)));
$this->response->headers('Content-Length',(string)$this->response->content_length());
$this->response->headers('Last-Modified',date('r', $f ? filemtime($f) : time()));
}
}
?>