see #5113 migration: add c_id field to student_publication

skala
Laurent Opprecht 13 years ago
parent 2996d675f9
commit 085d4116c3
  1. 3
      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);

Loading…
Cancel
Save