diff options
Diffstat (limited to 'includes/pages/admin_import.php')
-rw-r--r-- | includes/pages/admin_import.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/includes/pages/admin_import.php b/includes/pages/admin_import.php index 786ea08b..63104026 100644 --- a/includes/pages/admin_import.php +++ b/includes/pages/admin_import.php @@ -162,7 +162,9 @@ function admin_import() { list($rooms_new, $rooms_deleted) = prepare_rooms($import_file); foreach ($rooms_new as $room) { - sql_query("INSERT INTO `Room` SET `Name`='" . sql_escape($room) . "', `FromPentabarf`='Y', `Show`='Y'"); + $result = Room_create($room, true, true); + if ($result === false) + engelsystem_error('Unable to create room.'); $rooms_import[trim($room)] = sql_id(); } foreach ($rooms_deleted as $room) |