fixed redirection after delete and added check of selected files SC#111

This commit is contained in:
skodak 2005-04-24 20:15:06 +00:00
parent bce5c2cd47
commit 409fad8892

View file

@ -263,9 +263,12 @@
printfilelist($USER->filelist); printfilelist($USER->filelist);
print_simple_box_end(); print_simple_box_end();
echo "<br />"; echo "<br />";
$frameold = $CFG->framename;
$CFG->framename = "ibrowser";
notice_yesno (get_string("deletecheckfiles"), notice_yesno (get_string("deletecheckfiles"),
"coursefiles.php?id=$id&amp;wdir=$wdir&amp;action=delete&amp;confirm=1&amp;sesskey=$USER->sesskey", "coursefiles.php?id=$id&amp;wdir=$wdir&amp;action=delete&amp;confirm=1&amp;sesskey=$USER->sesskey",
"coursefiles.php?id=$id&amp;wdir=$wdir&amp;action=cancel"); "coursefiles.php?id=$id&amp;wdir=$wdir&amp;action=cancel");
$CFG->framename = $frameold;
} else { } else {
displaydir($wdir); displaydir($wdir);
} }
@ -609,7 +612,10 @@ function setfilelist($VARS) {
foreach ($VARS as $key => $val) { foreach ($VARS as $key => $val) {
if (substr($key,0,4) == "file") { if (substr($key,0,4) == "file") {
$count++; $count++;
$USER->filelist[] = rawurldecode($val); $val = rawurldecode($val);
if (!detect_munged_arguments($val, 0)) {
$USER->filelist[] = $val;
}
} }
} }
return $count; return $count;