changed: added Cur structure
we have there two pointers: Request * request; Session * session; these are the current request and the current session the session GC was moved to SessionManager (was in SessionContainer) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@708 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -19,41 +19,41 @@ namespace TemplatesFunctions
|
||||
|
||||
void stat_item_type_is_file(Info & i)
|
||||
{
|
||||
i.res = request->is_item && request->item.file_type == WINIX_ITEM_FILETYPE_NONE;
|
||||
i.res = cur->request->is_item && cur->request->item.file_type == WINIX_ITEM_FILETYPE_NONE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void stat_item_type_is_static_file(Info & i)
|
||||
{
|
||||
i.res = request->is_item && request->item.file_type != WINIX_ITEM_FILETYPE_NONE;
|
||||
i.res = cur->request->is_item && cur->request->item.file_type != WINIX_ITEM_FILETYPE_NONE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void stat_item_type_is_dir(Info & i)
|
||||
{
|
||||
i.res = !request->is_item;
|
||||
i.res = !cur->request->is_item;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void stat_item_inode(Info & i)
|
||||
{
|
||||
i.out << request->last_item->id;
|
||||
i.out << cur->request->last_item->id;
|
||||
}
|
||||
|
||||
|
||||
void stat_item_user(Info & i)
|
||||
{
|
||||
User * puser = system->users.GetUser(request->last_item->user_id);
|
||||
print_user_name(i, puser, request->last_item->guest_name);
|
||||
User * puser = system->users.GetUser(cur->request->last_item->user_id);
|
||||
print_user_name(i, puser, cur->request->last_item->guest_name);
|
||||
}
|
||||
|
||||
|
||||
void stat_item_group(Info & i)
|
||||
{
|
||||
long group_id = request->last_item->group_id;
|
||||
long group_id = cur->request->last_item->group_id;
|
||||
Group * pgroup = system->groups.GetGroup(group_id);
|
||||
|
||||
if( pgroup )
|
||||
@@ -65,20 +65,20 @@ void stat_item_group(Info & i)
|
||||
|
||||
void stat_item_privileges(Info & i)
|
||||
{
|
||||
i.out << Toa(request->last_item->privileges, 8);
|
||||
i.out << Toa(cur->request->last_item->privileges, 8);
|
||||
}
|
||||
|
||||
|
||||
void stat_item_date_creation(Info & i)
|
||||
{
|
||||
tm rtm = system->LocalTime(request->last_item->date_creation);
|
||||
tm rtm = system->LocalTime(cur->request->last_item->date_creation);
|
||||
i.out << DateToStr(rtm.tm_year + 1900, rtm.tm_mon + 1, rtm.tm_mday, rtm.tm_hour, rtm.tm_min, rtm.tm_sec);
|
||||
}
|
||||
|
||||
|
||||
void stat_item_date_modification(Info & i)
|
||||
{
|
||||
tm rtm = system->LocalTime(request->last_item->date_modification);
|
||||
tm rtm = system->LocalTime(cur->request->last_item->date_modification);
|
||||
i.out << DateToStr(rtm.tm_year + 1900, rtm.tm_mon + 1, rtm.tm_mday, rtm.tm_hour, rtm.tm_min, rtm.tm_sec);
|
||||
}
|
||||
|
||||
@@ -87,14 +87,14 @@ void stat_item_date_modification(Info & i)
|
||||
|
||||
void stat_item_template(Info & i)
|
||||
{
|
||||
i.out << request->last_item->html_template;
|
||||
i.out << cur->request->last_item->html_template;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void stat_item_is_template_from_mount_point(Info & i)
|
||||
{
|
||||
i.res = request->last_item->html_template.empty();
|
||||
i.res = cur->request->last_item->html_template.empty();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user