updated to new version of Ezc
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@602 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -26,7 +26,7 @@ namespace TemplatesFunctions
|
||||
|
||||
void item_is(Info & i)
|
||||
{
|
||||
i.result = request.is_item;
|
||||
i.res = request.is_item;
|
||||
}
|
||||
|
||||
|
||||
@@ -66,25 +66,22 @@ void item_content_noescape(Info & i)
|
||||
|
||||
void item_content_type_is(Info & i)
|
||||
{
|
||||
i.result = false;
|
||||
i.res = false;
|
||||
|
||||
if( !i.is )
|
||||
return;
|
||||
if( request.item.content_type == Item::ct_text && i.par == "text" )
|
||||
i.res = true;
|
||||
|
||||
if( request.item.content_type == Item::ct_text && (*i.is) == "text" )
|
||||
i.result = true;
|
||||
if( request.item.content_type == Item::ct_formatted_text && i.par == "formatted text" )
|
||||
i.res = true;
|
||||
|
||||
if( request.item.content_type == Item::ct_formatted_text && (*i.is) == "formatted text" )
|
||||
i.result = true;
|
||||
if( request.item.content_type == Item::ct_html && i.par == "html" )
|
||||
i.res = true;
|
||||
|
||||
if( request.item.content_type == Item::ct_html && (*i.is) == "html" )
|
||||
i.result = true;
|
||||
if( request.item.content_type == Item::ct_bbcode && i.par == "bbcode" )
|
||||
i.res = true;
|
||||
|
||||
if( request.item.content_type == Item::ct_bbcode && (*i.is) == "bbcode" )
|
||||
i.result = true;
|
||||
|
||||
if( request.item.content_type == Item::ct_raw && (*i.is) == "raw" )
|
||||
i.result = true;
|
||||
if( request.item.content_type == Item::ct_raw && i.par == "raw" )
|
||||
i.res = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -121,7 +118,7 @@ void item_print_content(std::ostringstream & out, const std::string & content, I
|
||||
|
||||
void item_content_is_empty(Info & i)
|
||||
{
|
||||
i.result = request.item.content.empty();
|
||||
i.res = request.item.content.empty();
|
||||
}
|
||||
|
||||
void item_print_content(Info & i)
|
||||
@@ -151,10 +148,10 @@ void item_url(Info & i)
|
||||
|
||||
void item_url_is(Info & i)
|
||||
{
|
||||
if( !request.is_item || !i.is )
|
||||
if( !request.is_item )
|
||||
return; // default false
|
||||
|
||||
i.result = request.item.url == *i.is;
|
||||
i.res = (request.item.url == i.par);
|
||||
}
|
||||
|
||||
|
||||
@@ -170,31 +167,31 @@ void item_link(Info & i)
|
||||
|
||||
void item_auth_is_none(Info & i)
|
||||
{
|
||||
i.result = request.item.auth == Item::auth_none;
|
||||
i.res = request.item.auth == Item::auth_none;
|
||||
}
|
||||
|
||||
|
||||
void item_auth_is_image(Info & i)
|
||||
{
|
||||
i.result = request.item.auth == Item::auth_image;
|
||||
i.res = request.item.auth == Item::auth_image;
|
||||
}
|
||||
|
||||
|
||||
void item_can_read(Info & i)
|
||||
{
|
||||
i.result = request.HasReadAccess(request.item);
|
||||
i.res = request.HasReadAccess(request.item);
|
||||
}
|
||||
|
||||
|
||||
void item_can_write(Info & i)
|
||||
{
|
||||
i.result = request.HasWriteAccess(request.item);
|
||||
i.res = request.HasWriteAccess(request.item);
|
||||
}
|
||||
|
||||
|
||||
void item_can_remove(Info & i)
|
||||
{
|
||||
i.result = request.CanRemove(request.item);
|
||||
i.res = request.CanRemove(request.item);
|
||||
}
|
||||
|
||||
|
||||
@@ -261,7 +258,7 @@ void item_dates_equal(Info & i)
|
||||
tm * ptm1 = &request.item.date_creation;
|
||||
tm * ptm2 = &request.item.date_modification;
|
||||
|
||||
i.result = ptm1->tm_year == ptm2->tm_year &&
|
||||
i.res = ptm1->tm_year == ptm2->tm_year &&
|
||||
ptm1->tm_mon == ptm2->tm_mon &&
|
||||
ptm1->tm_mday == ptm2->tm_mday &&
|
||||
ptm1->tm_hour == ptm2->tm_hour &&
|
||||
@@ -312,7 +309,7 @@ static size_t item_index;
|
||||
void item_tab(Info & i)
|
||||
{
|
||||
item_index = i.iter;
|
||||
i.result = item_index < request.item_table.size();
|
||||
i.res = item_index < request.item_table.size();
|
||||
}
|
||||
|
||||
|
||||
@@ -418,7 +415,7 @@ 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;
|
||||
i.res = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -517,7 +514,7 @@ void item_tab_dates_equal(Info & i)
|
||||
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 &&
|
||||
i.res = ptm1->tm_year == ptm2->tm_year &&
|
||||
ptm1->tm_mon == ptm2->tm_mon &&
|
||||
ptm1->tm_mday == ptm2->tm_mday &&
|
||||
ptm1->tm_hour == ptm2->tm_hour &&
|
||||
|
Reference in New Issue
Block a user