mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Merged fix for unclean oldname from renaming ... from stable.
This commit is contained in:
parent
7a5672c90c
commit
8ef1e12f74
@ -210,7 +210,8 @@
|
||||
case "rename":
|
||||
if (!empty($name)) {
|
||||
html_header($course, $wdir);
|
||||
$name = clean_filename($name);
|
||||
$name = clean_filename($name);
|
||||
$oldname = clean_filename($oldname);
|
||||
if (file_exists($basedir.$wdir."/".$name)) {
|
||||
echo "Error: $name already exists!";
|
||||
} else if (!rename($basedir.$wdir."/".$oldname, $basedir.$wdir."/".$name)) {
|
||||
|
@ -298,7 +298,8 @@
|
||||
case "rename":
|
||||
if (!empty($name)) {
|
||||
html_header($course, $wdir);
|
||||
$name = clean_filename($name);
|
||||
$name = clean_filename($name);
|
||||
$oldname = clean_filename($oldname);
|
||||
if (file_exists($basedir.$wdir."/".$name)) {
|
||||
echo "Error: $name already exists!";
|
||||
} else if (!rename($basedir.$wdir."/".$oldname, $basedir.$wdir."/".$name)) {
|
||||
|
@ -217,7 +217,8 @@
|
||||
case "rename":
|
||||
if (!empty($name)) {
|
||||
html_header($course, $wdir);
|
||||
$name = clean_filename($name);
|
||||
$name = clean_filename($name);
|
||||
$oldname = clean_filename($oldname);
|
||||
if (file_exists($basedir.$wdir."/".$name)) {
|
||||
echo "Error: $name already exists!";
|
||||
} else if (!rename($basedir.$wdir."/".$oldname, $basedir.$wdir."/".$name)) {
|
||||
|
@ -217,7 +217,8 @@
|
||||
case "rename":
|
||||
if (!empty($name)) {
|
||||
html_header($course, $wdir);
|
||||
$name = clean_filename($name);
|
||||
$name = clean_filename($name);
|
||||
$oldname = clean_filename($oldname);
|
||||
if (file_exists($basedir.$wdir."/".$name)) {
|
||||
echo "Error: $name already exists!";
|
||||
} else if (!rename($basedir.$wdir."/".$oldname, $basedir.$wdir."/".$name)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user