added: forum
added: mount params can have arguments (in parentheses)
added: mount params: withheader, withinfo, restrictcreatethread, only_root_can_remove,
can_use_emacs_on(level), can_use_mkdir_on(level),
added: table Item has 'subject' column now
removed: column 'subject' from table Content
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@505 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -63,6 +63,36 @@ void item_content_noescape(Info & i)
|
||||
}
|
||||
|
||||
|
||||
void item_print_content(Info & i)
|
||||
{
|
||||
if( request.item.content_type == 0 ) // simple txt
|
||||
{
|
||||
HtmlEscape(i.out, request.item.content);
|
||||
}
|
||||
else
|
||||
if( request.item.content_type == 1 ) // formatted txt
|
||||
{
|
||||
HtmlEscapeFormTxt(i.out, request.item.content);
|
||||
}
|
||||
else
|
||||
if( request.item.content_type == 2 ) // html
|
||||
{
|
||||
if( request.CanUseHtml(request.item.user_id) )
|
||||
i.out << request.item.content;
|
||||
else
|
||||
HtmlEscape(i.out, request.item.content);
|
||||
}
|
||||
else
|
||||
if( request.item.content_type == 3 ) // bbcode
|
||||
{
|
||||
if( request.CanUseBBCode(request.item.user_id) )
|
||||
HtmlEscape(i.out, request.item.content); // tutaj bedzie parsowanie bbcodu i tworzenie odpowiadajacego mu html-a
|
||||
else
|
||||
i.out << request.item.content;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void item_privileges(Info & i)
|
||||
{
|
||||
i.out << std::setbase(8) << request.item.privileges << std::setbase(10);
|
||||
@@ -96,6 +126,11 @@ void item_can_read(Info & i)
|
||||
i.result = true;
|
||||
}
|
||||
|
||||
void item_can_write(Info & i)
|
||||
{
|
||||
if( request.HasWriteAccess(request.item) )
|
||||
i.result = true;
|
||||
}
|
||||
|
||||
void item_info(Info & i)
|
||||
{
|
||||
@@ -111,7 +146,7 @@ void item_user(Info & i)
|
||||
if( puser )
|
||||
HtmlEscape(i.out, puser->name);
|
||||
else
|
||||
i.out << "unknown";
|
||||
i.out << "~guest"; // !! dodac do konfiga
|
||||
}
|
||||
|
||||
|
||||
@@ -278,6 +313,41 @@ void item_tab_content_noescape(Info & i)
|
||||
}
|
||||
|
||||
|
||||
void item_tab_print_content(Info & i)
|
||||
{
|
||||
if( item_index >= request.item_table.size() )
|
||||
return;
|
||||
|
||||
int type = request.item_table[item_index].content_type;
|
||||
|
||||
if( type == 0 ) // simple txt
|
||||
{
|
||||
HtmlEscape(i.out, request.item_table[item_index].content);
|
||||
}
|
||||
else
|
||||
if( type == 1 ) // formatted txt
|
||||
{
|
||||
HtmlEscapeFormTxt(i.out, request.item_table[item_index].content);
|
||||
}
|
||||
else
|
||||
if( type == 2 ) // html
|
||||
{
|
||||
if( request.CanUseHtml(request.item_table[item_index].user_id) )
|
||||
i.out << request.item_table[item_index].content;
|
||||
else
|
||||
HtmlEscape(i.out, request.item_table[item_index].content);
|
||||
}
|
||||
else
|
||||
if( type == 3 ) // bbcode
|
||||
{
|
||||
if( request.CanUseBBCode(request.item_table[item_index].user_id) )
|
||||
HtmlEscape(i.out, request.item_table[item_index].content); // tutaj bedzie parsowanie bbcodu i tworzenie odpowiadajacego mu html-a
|
||||
else
|
||||
i.out << request.item_table[item_index].content;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void item_tab_privileges(Info & i)
|
||||
{
|
||||
if( item_index < request.item_table.size() )
|
||||
@@ -343,7 +413,7 @@ void item_tab_user(Info & i)
|
||||
if( puser )
|
||||
HtmlEscape(i.out, puser->name);
|
||||
else
|
||||
i.out << "unknown";
|
||||
i.out << "~guest"; // !! dodac do konfiga
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user