From c9cb19ae1785d32e9cba0c4f3df65e84e3278cb1 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Tue, 10 Feb 2015 04:32:32 +0000 Subject: [PATCH] fixed a bug of dstoring a wrong value into the createdon field --- codepot/src/codepot/controllers/file.php | 4 ++-- codepot/src/codepot/models/filemodel.php | 2 +- codepot/src/codepot/views/file_show.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/codepot/src/codepot/controllers/file.php b/codepot/src/codepot/controllers/file.php index 7da725bc..e18ef27f 100644 --- a/codepot/src/codepot/controllers/file.php +++ b/codepot/src/codepot/controllers/file.php @@ -386,7 +386,7 @@ class File extends Controller { $data['message'] = $this->lang->line('MSG_FORM_INPUT_INCOMPLETE'); $data['file'] = $file; - $this->load->view ($this->VIEW_EDIT, $data); + $this->load->view ($this->VIEW_EDIT, $data); } } else @@ -408,7 +408,7 @@ class File extends Controller else { $data['file'] = $file; - $this->load->view ($this->VIEW_EDIT, $data); + $this->load->view ($this->VIEW_EDIT, $data); } } else diff --git a/codepot/src/codepot/models/filemodel.php b/codepot/src/codepot/models/filemodel.php index f9864a18..52c3a32e 100644 --- a/codepot/src/codepot/models/filemodel.php +++ b/codepot/src/codepot/models/filemodel.php @@ -43,7 +43,7 @@ class FileModel extends Model $this->db->set ('summary', $file->summary); $this->db->set ('md5sum', $file->md5sum); $this->db->set ('description', $file->description); - $this->db->set ('createdon', $userid); + $this->db->set ('createdon', date('Y-m-d H:i:s')); $this->db->set ('createdby', $userid); $this->db->set ('updatedon', date('Y-m-d H:i:s')); $this->db->set ('updatedby', $userid); diff --git a/codepot/src/codepot/views/file_show.php b/codepot/src/codepot/views/file_show.php index ed3af8f1..4fe4b514 100644 --- a/codepot/src/codepot/views/file_show.php +++ b/codepot/src/codepot/views/file_show.php @@ -117,7 +117,7 @@ $this->load->view (