From c459fc8f9ad7700e3cf3a0371621aa59769d3a9f Mon Sep 17 00:00:00 2001 From: Julian Prud'homme Date: Fri, 19 Jan 2007 11:07:07 +0100 Subject: [PATCH] [svn r10796] fix a minor bug --- main/chat/chat_chat.php | 4 +++- main/chat/chat_message.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/main/chat/chat_chat.php b/main/chat/chat_chat.php index 91611e1370..82feb4a417 100755 --- a/main/chat/chat_chat.php +++ b/main/chat/chat_chat.php @@ -60,6 +60,7 @@ $dateNow=date('Y-m-d'); $documentPath=api_get_path(SYS_COURSE_PATH).$_course['path'].'/document/'; $chatPath=$documentPath.'chat_files/'; +$TABLEITEMPROPERTY= Database::get_course_table(TABLE_ITEM_PROPERTY); if(!is_dir($chatPath)) { @@ -73,7 +74,8 @@ if(!is_dir($chatPath)) $doc_id=add_document($_course,'/chat_files','folder',0,'chat_files'); - api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'FolderCreated', $_user['user_id']); + api_sql_query("INSERT INTO ".$TABLEITEMPROPERTY . " (tool,insert_user_id,insert_date,lastedit_date,ref,lastedit_type,lastedit_user_id,to_group_id,to_user_id,visibility) VALUES ('document',1,NOW(),NOW(),$doc_id,'DocumentAdded',1,0,NULL,0)"); + } if(!file_exists($chatPath.'messages-'.$dateNow.'.log')) diff --git a/main/chat/chat_message.php b/main/chat/chat_message.php index d5c7adbd8e..0925ba47fc 100755 --- a/main/chat/chat_message.php +++ b/main/chat/chat_message.php @@ -79,6 +79,7 @@ $dateNow=date('Y-m-d'); $documentPath=api_get_path(SYS_COURSE_PATH).$_course['path'].'/document/'; $chatPath=$documentPath.'chat_files/'; +$TABLEITEMPROPERTY= Database::get_course_table(TABLE_ITEM_PROPERTY); if(!is_dir($chatPath)) { @@ -92,7 +93,8 @@ if(!is_dir($chatPath)) $doc_id=add_document($_course,'/chat_files','folder',0,'chat_files'); - api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'FolderCreated', $_user['user_id']); + api_sql_query("INSERT INTO ".$TABLEITEMPROPERTY . " (tool,insert_user_id,insert_date,lastedit_date,ref,lastedit_type,lastedit_user_id,to_group_id,to_user_id,visibility) VALUES ('document',1,NOW(),NOW(),$doc_id,'DocumentAdded',1,0,NULL,0)"); + } $chat_size=0;