diff --git a/main/install/update-db-1.8.8-1.9.0.inc.php b/main/install/update-db-1.8.8-1.9.0.inc.php index cd217cfb5e..b7a42878e2 100755 --- a/main/install/update-db-1.8.8-1.9.0.inc.php +++ b/main/install/update-db-1.8.8-1.9.0.inc.php @@ -441,8 +441,7 @@ if (defined('SYSTEM_INSTALLATION')) { if (!empty($work_dir_created[$work_key])) { $parent_id = $work_dir_created[$work_key]; $new_url = "work/".$dir_name.'/'.basename($work['url']); - $new_url = Database::escape_string($new_url); - $sql = "UPDATE $work_table SET url = '$new_url', parent_id = $parent_id, contains_file = '1' WHERE id = {$work['id']}"; + $new_url = Database::escape_string($new_url);$sql = "UPDATE $work_table SET url = '$new_url', parent_id = $parent_id, contains_file = '1' WHERE id = {$work['id']} AND c_id = {$work['c_id']}"; iDatabase::query($sql); if (is_dir($final_dir)) { rename($course_dir.'/'.$work['url'], $course_dir.'/'.$new_url);