ItemContent::user_name(EzcEnv & env) changed to ItemContent::user(morm::ModelWrapper ** model_wrapper) and we return a User class
ItemContent::group_name(EzcEnv & env) changed to ItemContent::group(morm::ModelWrapper ** model_wrapper) and we return a Group class added ItemContent::display_user_name(EzcEnv & env) some functions in templates/item.cpp moved to Item
This commit is contained in:
@@ -142,25 +142,12 @@ void print_date_nice(Info & i, const pt::Date & date)
|
||||
|
||||
|
||||
|
||||
|
||||
// cannot be a const reference at the moment (pt::Space is used)
|
||||
void print_user_name(Info & i, User & user)
|
||||
{
|
||||
std::wstring * dname = user.aenv.get_wstr(L"display_name");
|
||||
|
||||
if( dname && !IsWhite(*dname, true) )
|
||||
i.out << *dname;
|
||||
else
|
||||
i.out << user.name;
|
||||
}
|
||||
|
||||
|
||||
// IMPROVEME move me to User class
|
||||
// DEPRECATED, we have ItemContent::display_user_name and User::display_name
|
||||
void print_user_name(Info & i, User * puser, const std::wstring & guest_name)
|
||||
{
|
||||
if( puser )
|
||||
{
|
||||
print_user_name(i, *puser);
|
||||
puser->display_name(i);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -176,6 +163,7 @@ void print_user_name(Info & i, User * puser, const std::wstring & guest_name)
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace TemplatesFunctions
|
||||
|
||||
} // namespace Winix
|
||||
|
||||
Reference in New Issue
Block a user