[svn r18270] Logic change - Fixed the folders by default into document toll must not be removed - see FS#3611

skala
Cristian Fasanando 17 years ago
parent 96b1cf8243
commit 2a491bb85d
  1. 1
      documentation/changelog.html
  2. 4
      main/document/document.inc.php
  3. 12
      main/document/document.php

@ -163,6 +163,7 @@
<li>Fixed 31 bugs in file/image/sounds/flash uploads/delete/permissions in profile/homepage/agenda edition pages</li>
<li>Fixed a bug in migration for several versions at once whereby new course tools were repeated several times (SVN#17935)</li>
<li>Fixed security issue allowing users to upload php files on the server through FCKEditor (FS#2970)</li>
<li>Fixed folders by default into document tool must not be removed - see FS#3611</li>
</ul>
<br />
<h3>CSS changes</h3>

@ -1,4 +1,4 @@
<?php // $Id: document.inc.php 18203 2009-02-03 18:02:16Z ndieschburg $
<?php // $Id: document.inc.php 18270 2009-02-05 22:07:04Z cfasanando $
/*
==============================================================================
@ -290,7 +290,7 @@ function build_edit_icons($curdirpath,$type,$path,$visibility,$id,$is_template,$
else
{
$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) {
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) {
$modify_icons .= '&nbsp;<img src="../img/delete_na.gif" border="0" title="'.get_lang('Delete').'" alt="'.get_lang('Delete').'" /></a>';
} else {
$modify_icons .= '&nbsp;<a href="'.api_get_self().'?'.api_get_cidreq().'&curdirpath='.$curdirpath.'&amp;delete='.urlencode($path).$req_gid.'&amp;'.$sort_params.'" onclick="return confirmation(\''.basename($path).'\');"><img src="../img/delete.gif" border="0" title="'.get_lang('Delete').'" alt="" /></a>';

@ -1,4 +1,4 @@
<?php // $Id: document.php 18203 2009-02-03 18:02:16Z ndieschburg $
<?php // $Id: document.php 18270 2009-02-05 22:07:04Z cfasanando $
/*
==============================================================================
Dokeos - elearning and course management software
@ -467,11 +467,17 @@ if($is_allowed_to_edit || $group_member_with_upload_rights) // TEACHER ONLY
}
}
foreach($_POST['path'] as $index => $path)
foreach($_POST['path'] as $index => $path)
{
DocumentManager::delete_document($_course,$path,$base_work_dir);
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) {
continue;
} else {
$delete_document = DocumentManager::delete_document($_course,$path,$base_work_dir);
}
}
if (!empty($delete_document)) {
Display::display_confirmation_message(get_lang('DocDeleted'));
}
break;
}
}

Loading…
Cancel
Save