mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
Rename $insert var to $qb
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
51d228932f
commit
865ac4b6e0
1 changed files with 8 additions and 8 deletions
|
|
@ -104,23 +104,23 @@ class TrashbinMigrator implements IMigrator {
|
|||
throw new UserMigrationException("Could not import trashbin.");
|
||||
}
|
||||
$locations = json_decode($importSource->getFileContents(static::PATH_LOCATIONS), true, 512, JSON_THROW_ON_ERROR);
|
||||
$insert = $this->dbc->getQueryBuilder();
|
||||
$insert->insert('files_trash')
|
||||
$qb = $this->dbc->getQueryBuilder();
|
||||
$qb->insert('files_trash')
|
||||
->values([
|
||||
'id' => $insert->createParameter('id'),
|
||||
'timestamp' => $insert->createParameter('timestamp'),
|
||||
'location' => $insert->createParameter('location'),
|
||||
'user' => $insert->createNamedParameter($uid),
|
||||
'id' => $qb->createParameter('id'),
|
||||
'timestamp' => $qb->createParameter('timestamp'),
|
||||
'location' => $qb->createParameter('location'),
|
||||
'user' => $qb->createNamedParameter($uid),
|
||||
]);
|
||||
foreach ($locations as $id => $fileLocations) {
|
||||
foreach ($fileLocations as $timestamp => $location) {
|
||||
$insert
|
||||
$qb
|
||||
->setParameter('id', $id)
|
||||
->setParameter('timestamp', $timestamp)
|
||||
->setParameter('location', $location)
|
||||
;
|
||||
|
||||
$insert->executeStatement();
|
||||
$qb->executeStatement();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue