struct Item has modification_user_id (long) now
this is the id of a user who has modified the item recently this is only for information, persmissions don't use it git-svn-id: svn://ttmath.org/publicrep/winix/trunk@614 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -94,6 +94,7 @@ void Content::PostFunCreateThread()
|
||||
return;
|
||||
|
||||
ReadItem(request.item, Item::dir);
|
||||
SetUser(request.item);
|
||||
ReadThread(request.thread);
|
||||
request.item.privileges = 0777; // !! tymczasowo 777 aby wszyscy mogli wysylac posty
|
||||
|
||||
|
||||
@@ -182,6 +182,7 @@ void Content::PostFunCreateTicket()
|
||||
return;
|
||||
|
||||
ReadItem(request.item, Item::dir);
|
||||
SetUser(request.item);
|
||||
ReadTicket(request.ticket);
|
||||
request.item.privileges = 0777; // !! tymczasowo 777 aby wszyscy mogli wysylac posty
|
||||
|
||||
|
||||
@@ -138,8 +138,9 @@ void Content::PostFunEditTicket()
|
||||
if( !FunEditTicketCheckAccess() )
|
||||
return;
|
||||
|
||||
|
||||
ReadItem(request.item, Item::dir);
|
||||
// co z uzytkownikiem i grup<75>? chyba nie wczytane? !!! (wczesniej bylo SetUser() w ReadItem() - teraz nie ma)
|
||||
// dodac informacje o modyfikacji !!!
|
||||
|
||||
if( !FunCreateTicketCheckAbuse() )
|
||||
{
|
||||
|
||||
@@ -56,8 +56,14 @@ void Content::PostFunEmacsAdd(Item & item)
|
||||
|
||||
void Content::PostFunEmacsEdit(bool with_url)
|
||||
{
|
||||
if( request.session->puser )
|
||||
request.item.modification_user_id = request.session->puser->id;
|
||||
else
|
||||
request.item.modification_user_id = -1;
|
||||
|
||||
request.item.SetDateModifyToNow();
|
||||
request.status = db.EditItemById(request.item, with_url);
|
||||
|
||||
|
||||
if( request.status == WINIX_ERR_OK )
|
||||
{
|
||||
@@ -131,6 +137,7 @@ void Content::PostFunEmacs()
|
||||
{
|
||||
request.is_item = true;
|
||||
request.item.privileges = 0644; // !! tymczasowo, bedzie uzyte umask
|
||||
SetUser(request.item);
|
||||
PostFunEmacsAdd(request.item);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -114,8 +114,6 @@ bool Content::ReadItem(Item & item, Item::Type item_type)
|
||||
|
||||
bool edit_with_url = ReadItemUrlSubject(item, item_type);
|
||||
|
||||
SetUser(item);
|
||||
|
||||
if( item_type == Item::file )
|
||||
ReadItemContentWithType(item);
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ void Content::PostFunMkdir(bool add_to_dir_table, int privileges)
|
||||
return;
|
||||
|
||||
ReadItem(request.item, Item::dir);
|
||||
SetUser(request.item);
|
||||
request.item.privileges = privileges;
|
||||
|
||||
Mkdir(request.item, add_to_dir_table);
|
||||
|
||||
@@ -136,6 +136,7 @@ void Content::UploadSingle()
|
||||
bool has_url = (new_url && (*new_url)[0] != 0 );
|
||||
|
||||
ReadItem(request.item, Item::file); // ReadItem() changes the url if it is empty
|
||||
SetUser(request.item);
|
||||
request.item.privileges = 0644; // !! tymczasowo
|
||||
|
||||
const char * file_name = request.post_file_table.begin()->second.filename.c_str();
|
||||
|
||||
Reference in New Issue
Block a user