Feature #751 - "Documents" tool: Blocking deletion action for the special folder "certificates".

skala
Ivan Tcholakov 15 years ago
parent 88ef7ef86f
commit 87eb7aea2e
  1. 2
      main/document/document.inc.php
  2. 2
      main/document/document.php

@ -267,7 +267,7 @@ function build_edit_icons($curdirpath, $type, $path, $visibility, $id, $is_templ
$modify_icons = '<a href="edit_document.php?'.api_get_cidreq().'&curdirpath='.$curdirpath.'&amp;file='.urlencode($path).$req_gid.'"><img src="../img/edit.gif" border="0" title="'.get_lang('Modify').'" alt="" /></a>';
}
if (strcmp($path,'/audio')===0 or strcmp($path,'/flash')===0 or strcmp($path,'/images')===0 or strcmp($path,'/shared_folder')===0 or strcmp($path,'/video')===0) {
if (in_array($path, array('/audio', '/flash', '/images', '/shared_folder', '/video', '/chat_files', '/certificates'))) {
$modify_icons .= '&nbsp;'.Display::return_icon('delete_na.gif',get_lang('ThisFolderCannotBeDeleted'));
} else {

@ -418,7 +418,7 @@ if ($is_allowed_to_edit || $group_member_with_upload_rights) { // TEACHER ONLY
}
foreach ($_POST['path'] as $index => & $path) {
if (in_array($path, array('/audio', '/flash', '/images', '/shared_folder', '/video', '/chat_files'))) {
if (in_array($path, array('/audio', '/flash', '/images', '/shared_folder', '/video', '/chat_files', '/certificates'))) {
continue;
} else {
$delete_document = DocumentManager::delete_document($_course, $path, $base_work_dir);

Loading…
Cancel
Save