added: date_creation and date_modification to items

changed: function 'run' is using a template: fun_run.html
         there is: [item_run] called from this template


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@489 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2009-03-22 23:54:15 +00:00
parent 951d0e8653
commit bbaefd0f77
20 changed files with 274 additions and 107 deletions

View File

@@ -42,6 +42,8 @@ void Content::PostFunEmacsAdd()
request.item.parent_id = request.dir_table.back()->id;
request.item.type = Item::file;
// dates (creation and modification) is set by request.item.Clear() at the beginning
if( !request.HasWriteAccess(*request.dir_table.back() ) )
throw Error(Error::permision_denied);
@@ -56,7 +58,10 @@ void Content::PostFunEmacsEdit(bool with_url)
if( !request.HasWriteAccess(request.item) )
throw Error(Error::permision_denied);
time_t t = std::time(0);
request.item.date_modification = *std::localtime( &t );
request.session->done_status = db.EditItemById(request.item, with_url);
if( request.session->done_status == Error::ok )