From bfbb94f5e24aad9bf92e8a5faa21051499bfb620 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Fri, 3 Aug 2007 03:57:31 +0200 Subject: [PATCH] [svn r12866] Added require for fileManage.lib.php as it is needed by the my_delete() function (in the delete_document() method) Improved require for metadata (get the right path in api_get_path()) --- main/inc/lib/document.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/inc/lib/document.lib.php b/main/inc/lib/document.lib.php index ceb57771a9..130d88fe93 100644 --- a/main/inc/lib/document.lib.php +++ b/main/inc/lib/document.lib.php @@ -588,7 +588,6 @@ class DocumentManager { $TABLE_DOCUMENT = Database :: get_course_table(TABLE_DOCUMENT, $_course['dbName']); $TABLE_ITEMPROPERTY = Database :: get_course_table(TABLE_ITEM_PROPERTY, $_course['dbName']); - //first, delete the actual document... $document_id = DocumentManager :: get_document_id($_course, $path); $new_path = $path.'_DELETED_'.$document_id; @@ -604,7 +603,8 @@ class DocumentManager if ($what_to_delete_result && mysql_num_rows($what_to_delete_result) != 0) { //needed to deleted medadata - require_once (api_get_path(INCLUDE_PATH)."../metadata/md_funcs.php"); + require_once (api_get_path(SYS_CODE_PATH).'metadata/md_funcs.php'); + require_once(api_get_path(LIBRARY_PATH).'fileManage.lib.php'); $mdStore = new mdstore(TRUE); //delete all item_property entries