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:
@@ -58,6 +58,7 @@ bool Default::HasAccess()
|
||||
void Default::MakePost()
|
||||
{
|
||||
Item & dir = *cur->request->dir_tab.back();
|
||||
dir.propagate_connector();
|
||||
|
||||
dir.item_content.link_to = cur->request->PostVar(L"linkto");
|
||||
dir.item_content.link_redirect = cur->request->IsPostVar(L"makeredirect") ? 1 : 0;
|
||||
@@ -66,7 +67,7 @@ void Default::MakePost()
|
||||
// !! IMPROVEME dodac sprawdzenie czy link_to jest pusty teraz
|
||||
|
||||
//cur->request->status = db->EditLinkItem(dir.id, dir.link_to, dir.link_redirect);
|
||||
if( dir.update(false, true) )
|
||||
if( dir.item_content.update() )
|
||||
{
|
||||
log << log2 << "Default: changed link_to: " << dir.item_content.link_to << ", for dir_id: " << dir.id << logend;
|
||||
system->RedirectToLastDir();
|
||||
|
||||
Reference in New Issue
Block a user