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:
@@ -23,11 +23,12 @@ Ezc::Pattern pat_fun_default;
|
||||
Ezc::Pattern pat_fun_priv;
|
||||
Ezc::Pattern pat_fun_rm;
|
||||
Ezc::Pattern pat_fun_who;
|
||||
Ezc::Pattern pat_fun_run;
|
||||
Ezc::Pattern pat_err_item_required;
|
||||
Ezc::Pattern pat_err_404;
|
||||
Ezc::Pattern pat_err_per_denied;
|
||||
Ezc::Pattern pat_err_others;
|
||||
|
||||
Ezc::Pattern pat_item_info;
|
||||
|
||||
|
||||
Ezc::Functions functions;
|
||||
@@ -38,6 +39,8 @@ PatternCacher pattern_cacher;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// !! tymczasowa funkcja
|
||||
void is_group_tv(Info & i)
|
||||
{
|
||||
@@ -93,8 +96,7 @@ Ezc::Pattern * p = 0;
|
||||
break;
|
||||
|
||||
case FUN_RUN:
|
||||
if( request.is_item )
|
||||
p = pattern_cacher.GetPattern(request.item);
|
||||
p = &pat_fun_run;
|
||||
break;
|
||||
|
||||
case FUN_WHO:
|
||||
@@ -202,7 +204,12 @@ void Templates::CreateFunctions()
|
||||
functions.Insert("item_url", item_url);
|
||||
functions.Insert("item_link", item_link);
|
||||
functions.Insert("item_can_read", item_can_read);
|
||||
|
||||
functions.Insert("item_info", item_info);
|
||||
functions.Insert("item_user", item_user);
|
||||
functions.Insert("item_date_creation", item_date_creation);
|
||||
functions.Insert("item_date_modification", item_date_modification);
|
||||
functions.Insert("item_dates_equal", item_dates_equal);
|
||||
functions.Insert("item_run", item_run);
|
||||
|
||||
functions.Insert("item_old_id", item_old_id);
|
||||
functions.Insert("item_old_subject", item_old_subject);
|
||||
@@ -353,6 +360,12 @@ void Templates::Read()
|
||||
pat_fun_who.Directory(data.templates);
|
||||
pat_fun_who.ParseFile("fun_who.html");
|
||||
|
||||
pat_fun_run.Directory(data.templates);
|
||||
pat_fun_run.ParseFile("fun_run.html");
|
||||
|
||||
pat_item_info.Directory(data.templates);
|
||||
pat_item_info.ParseFile("item_info.html");
|
||||
|
||||
CreateFunctions();
|
||||
|
||||
#ifdef APPTEMPLATES
|
||||
|
Reference in New Issue
Block a user