updated to the new morm api - models methods which take 'morm::ModelWrapper ** model_wrapper' now take 'morm::Wrapper & wrapper'

master
Tomasz Sowa 2 years ago
parent df3f04a951
commit 732144df01

@ -389,9 +389,9 @@ const std::wstring & Request::ParamValue(const std::wstring & param_name)
void Request::current_dir(morm::ModelWrapper ** model_wrapper)
void Request::current_dir(morm::Wrapper & wrapper)
{
*model_wrapper = new morm::ModelWrapperModel(dir_tab.back());
wrapper.model = dir_tab.back();
}

@ -452,7 +452,7 @@ private:
void ClearOutputStreams();
void current_dir(morm::ModelWrapper ** model_wrapper);
void current_dir(morm::Wrapper & wrapper);
MORM_MEMBER_FIELD(Request)

@ -436,7 +436,7 @@ bool ItemContent::has_group() const
return group_id != -1;
}
void ItemContent::user(morm::ModelWrapper ** model_wrapper)
void ItemContent::user(morm::Wrapper & wrapper)
{
Users * users = get_users();
@ -446,13 +446,13 @@ void ItemContent::user(morm::ModelWrapper ** model_wrapper)
if( puser )
{
*model_wrapper = new morm::ModelWrapperModel(puser);
wrapper.model = puser;
}
}
}
void ItemContent::group(morm::ModelWrapper ** model_wrapper)
void ItemContent::group(morm::Wrapper & wrapper)
{
Groups * groups = get_groups();
@ -462,7 +462,7 @@ void ItemContent::group(morm::ModelWrapper ** model_wrapper)
if( pgroup )
{
*model_wrapper = new morm::ModelWrapperModel(pgroup);
wrapper.model = pgroup;
}
}
}

@ -285,8 +285,8 @@ protected:
void print_content(EzcEnv & env);
void has_static_file(EzcEnv & env);
void privileges_octal(EzcEnv & env);
void user(morm::ModelWrapper ** model_wrapper);
void group(morm::ModelWrapper ** model_wrapper);
void user(morm::Wrapper & wrapper);
void group(morm::Wrapper & wrapper);
void type_is(EzcEnv & env);
void is_empty(EzcEnv & env);
void file_type_is_none(EzcEnv & env);

@ -63,12 +63,9 @@ public:
protected:
void get_user(morm::ModelWrapper ** model_wrapper)
void get_user(morm::Wrapper & wrapper)
{
if( user )
{
*model_wrapper = new morm::ModelWrapperModel(user);
}
wrapper.model = user;
}
bool has_user()

Loading…
Cancel
Save