Commit e150d87c authored by Karamel's avatar Karamel
Browse files

Fix importing floors from v7 with custom data.

parent efae5016
......@@ -306,12 +306,14 @@ if ($stmt->execute()) {
$api = \Pasteque\Server\API\PlaceAPI::fromApp($ptApp);
$stmt = $pdo->prepare('select * from FLOORS');
$floorMapping = [];
$dispOrder = 0;
if ($stmt->execute()) {
$stmt2 = $pdo->prepare('select * from PLACES where FLOOR = :id');
while ($row = $stmt->fetch()) {
$dispOrder++;
$floor = new \Pasteque\Server\Model\Floor();
$floor->setLabel($row['NAME']);
$floor->setDispOrder($row['ID']);
$floor->setDispOrder($dispOrder);
$stmt2->bindValue(':id', $row['ID']);
if ($stmt2->execute()) {
while ($row2 = $stmt2->fetch()) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment