removed from Item: update() and save() methods which take the 'url_was_changed' argument
and added ItemModelData (based on morm::ModelData) class which has 'prepare_unique_url' field, an object of this class is passed to update(), insert() and save() methods fixed: Dirs::CheckRootDir(): update should update childs too (privileges) WIP: #4
This commit is contained in:
@@ -76,8 +76,12 @@ void Subject::EditDirSubject()
|
||||
Item & dir = *cur->request->dir_tab.back();
|
||||
|
||||
cur->request->PostVar(L"subject", dir.subject);
|
||||
dir.update(false, false);
|
||||
|
||||
ItemModelData item_model_data;
|
||||
item_model_data.prepare_unique_url = false;
|
||||
|
||||
//db->EditSubjectById(dir, dir.id);
|
||||
dir.update(item_model_data, false);
|
||||
|
||||
// !! IMPROVE ME
|
||||
// we need something like WINIX_DIR_CHANGED message
|
||||
@@ -91,7 +95,11 @@ void Subject::EditDirSubject()
|
||||
void Subject::EditFileSubject()
|
||||
{
|
||||
cur->request->PostVar(L"subject", cur->request->item.subject);
|
||||
cur->request->item.update(false, false);
|
||||
|
||||
ItemModelData item_model_data;
|
||||
item_model_data.prepare_unique_url = false;
|
||||
|
||||
cur->request->item.update(item_model_data, false);
|
||||
//db->EditSubjectById(cur->request->item, cur->request->item.id);
|
||||
|
||||
plugin->Call(WINIX_FILE_CHANGED, &cur->request->item);
|
||||
|
Reference in New Issue
Block a user