MDL-22950 adding new component column to the files table, unfortunately this change requires changes in all 2.0dev code, please review all custom code that was already upgraded to 2.0; fixing multiple problems and regressions in mod/assignment

This commit is contained in:
Petr Skoda
2010-07-03 13:37:13 +00:00
parent ffc3f866d5
commit 64f93798d4
220 changed files with 4713 additions and 4375 deletions
@@ -103,13 +103,14 @@ abstract class backup_structure_dbops extends backup_dbops {
}
}
public static function annotate_files($backupid, $contextid, $filearea, $itemid) {
public static function annotate_files($backupid, $contextid, $component, $filearea, $itemid) {
global $DB;
$sql = 'SELECT id
FROM {files}
WHERE contextid = ?
AND component = ?
AND filearea = ?';
$params = array($contextid, $filearea);
$params = array($contextid, $component, $filearea);
if (!is_null($itemid)) { // Add itemid to query and params if necessary
$sql .= ' AND itemid = ?';