Merge branch 'MDL-42768-master' of git://github.com/FMCorz/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2013-11-13 23:15:23 +01:00
commit 529d3bad0e

View file

@ -2210,9 +2210,15 @@ class restore_calendarevents_structure_step extends restore_structure_step {
} else {
$params['instance'] = 0;
}
$sql = 'SELECT id FROM {event} WHERE name = ? AND courseid = ? AND
repeatid = ? AND modulename = ? AND timestart = ? AND timeduration =?
AND ' . $DB->sql_compare_text('description', 255) . ' = ' . $DB->sql_compare_text('?', 255);
$sql = "SELECT id
FROM {event}
WHERE " . $DB->sql_compare_text('name', 255) . " = " . $DB->sql_compare_text('?', 255) . "
AND courseid = ?
AND repeatid = ?
AND modulename = ?
AND timestart = ?
AND timeduration = ?
AND " . $DB->sql_compare_text('description', 255) . " = " . $DB->sql_compare_text('?', 255);
$arg = array ($params['name'], $params['courseid'], $params['repeatid'], $params['modulename'], $params['timestart'], $params['timeduration'], $params['description']);
$result = $DB->record_exists_sql($sql, $arg);
if (empty($result)) {