added: mount points have parameters now
added: to the database: table 'thread' git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@499 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -313,6 +313,94 @@ void item_tab_link(Info & i)
|
||||
}
|
||||
|
||||
|
||||
void item_tab_can_read(Info & i)
|
||||
{
|
||||
if( item_index < request.item_table.size() )
|
||||
{
|
||||
if( request.HasReadAccess(request.item_table[item_index]) )
|
||||
i.result = true;
|
||||
}
|
||||
}
|
||||
|
||||
void item_tab_info(Info & i)
|
||||
{
|
||||
Ezc::Generator gen(i.out, pat_item_tab_info, functions);
|
||||
gen.Generate();
|
||||
}
|
||||
|
||||
|
||||
void item_tab_user(Info & i)
|
||||
{
|
||||
if( item_index < request.item_table.size() )
|
||||
{
|
||||
User * puser = data.users.GetUser(request.item_table[item_index].user_id);
|
||||
|
||||
if( puser )
|
||||
HtmlEscape(i.out, puser->name);
|
||||
else
|
||||
i.out << "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void item_tab_date_creation(Info & i)
|
||||
{
|
||||
if( item_index < request.item_table.size() )
|
||||
{
|
||||
tm * ptm = &request.item_table[item_index].date_creation;
|
||||
|
||||
i.out << DateToStr(ptm->tm_year + 1900, ptm->tm_mon + 1, ptm->tm_mday, ptm->tm_hour, ptm->tm_min, ptm->tm_sec);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void item_tab_date_modification(Info & i)
|
||||
{
|
||||
if( item_index < request.item_table.size() )
|
||||
{
|
||||
tm * ptm = &request.item_table[item_index].date_modification;
|
||||
|
||||
i.out << DateToStr(ptm->tm_year + 1900, ptm->tm_mon + 1, ptm->tm_mday, ptm->tm_hour, ptm->tm_min, ptm->tm_sec);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void item_tab_dates_equal(Info & i)
|
||||
{
|
||||
if( item_index < request.item_table.size() )
|
||||
{
|
||||
tm * ptm1 = &request.item_table[item_index].date_creation;
|
||||
tm * ptm2 = &request.item_table[item_index].date_modification;
|
||||
|
||||
i.result = ptm1->tm_year == ptm2->tm_year &&
|
||||
ptm1->tm_mon == ptm2->tm_mon &&
|
||||
ptm1->tm_mday == ptm2->tm_mday &&
|
||||
ptm1->tm_hour == ptm2->tm_hour &&
|
||||
ptm1->tm_min == ptm2->tm_min &&
|
||||
ptm1->tm_sec == ptm2->tm_sec;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void item_tab_run(Info & i)
|
||||
{
|
||||
if( item_index < request.item_table.size() )
|
||||
{
|
||||
if( !request.HasReadExecAccess(request.item) )
|
||||
{
|
||||
i.out << "<!-- run: permission denied -->";
|
||||
return;
|
||||
}
|
||||
|
||||
Ezc::Pattern * p = pattern_cacher.GetPattern(request.item_table[item_index]);
|
||||
Ezc::Generator gen(i.out, *p, functions);
|
||||
gen.Generate();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace TemplatesFunctions
|
||||
|
||||
|
Reference in New Issue
Block a user