Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
SAMBUMBA
pasteque-server
Commits
e150d87c
Commit
e150d87c
authored
Dec 13, 2017
by
Karamel
Browse files
Fix importing floors from v7 with custom data.
parent
efae5016
Changes
1
Hide whitespace changes
Inline
Side-by-side
bin/upgrade7/importdb.php
View file @
e150d87c
...
...
@@ -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
())
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment