|
@@ -77,14 +77,14 @@ discard block |
|
|
block discarded – undo |
|
77
|
77
|
} |
|
78
|
78
|
|
|
79
|
79
|
// based on owner's userid, we create federateduser and a new circle |
|
80
|
|
- $this->output->writeln('+ New Team <info>' . $rowCG['display_name'] . '</info>, owner by <info>' . $ownerId . '</info>'); |
|
|
80
|
+ $this->output->writeln('+ New Team <info>'.$rowCG['display_name'].'</info>, owner by <info>'.$ownerId.'</info>'); |
|
81
|
81
|
$owner = $this->cachedFed($ownerId); |
|
82
|
82
|
|
|
83
|
83
|
$this->circlesManager->startSession($owner); |
|
84
|
84
|
try { |
|
85
|
85
|
$circle = $this->circlesManager->createCircle($rowCG['display_name']); |
|
86
|
86
|
} catch (\Exception $e) { |
|
87
|
|
- $this->output->writeln('<error>' . get_class($e) . ' ' . $e->getMessage() . '</error> with data ' . json_encode($rowCG)); |
|
|
87
|
+ $this->output->writeln('<error>'.get_class($e).' '.$e->getMessage().'</error> with data '.json_encode($rowCG)); |
|
88
|
88
|
$this->logger->log(2, 'error while creating circle', ['exception' => $e]); |
|
89
|
89
|
$this->circlesManager->stopSession(); |
|
90
|
90
|
continue; |
|
@@ -111,13 +111,13 @@ discard block |
|
|
block discarded – undo |
|
111
|
111
|
continue; // owner is already in the circles |
|
112
|
112
|
} |
|
113
|
113
|
|
|
114
|
|
- $this->output->writeln(' - new member <info>' . $userId .'</info>'); |
|
|
114
|
+ $this->output->writeln(' - new member <info>'.$userId.'</info>'); |
|
115
|
115
|
$member = $this->circlesManager->addMember($circle->getSingleId(), $this->cachedFed($userId)); |
|
116
|
116
|
if ($rowM['role'] === '1') { |
|
117
|
117
|
$this->circlesManager->levelMember($member->getId(), Member::LEVEL_ADMIN); |
|
118
|
118
|
} |
|
119
|
119
|
} catch (\Exception $e) { |
|
120
|
|
- $this->output->writeln('<error>' . get_class($e) . ' ' . $e->getMessage() . '</error>'); |
|
|
120
|
+ $this->output->writeln('<error>'.get_class($e).' '.$e->getMessage().'</error>'); |
|
121
|
121
|
$this->logger->log(2, 'error while migrating custom group member', ['exception' => $e]); |
|
122
|
122
|
} |
|
123
|
123
|
} |
|
@@ -153,7 +153,7 @@ discard block |
|
|
block discarded – undo |
|
153
|
153
|
->where($update->expr()->in('id', $update->createNamedParameter($shareIds, IQueryBuilder::PARAM_INT_ARRAY))); |
|
154
|
154
|
|
|
155
|
155
|
$count = $update->executeStatement(); |
|
156
|
|
- $this->output->writeln('> ' . $count . ' shares updated'); |
|
|
156
|
+ $this->output->writeln('> '.$count.' shares updated'); |
|
157
|
157
|
|
|
158
|
158
|
$this->fixShareChildren($shareIds, $memberIds); |
|
159
|
159
|
} |
|
@@ -187,13 +187,13 @@ discard block |
|
|
block discarded – undo |
|
187
|
187
|
->andWhere($update->expr()->eq('share_with', $update->createParameter('old_recipient'))); |
|
188
|
188
|
|
|
189
|
189
|
$count = 0; |
|
190
|
|
- foreach($memberIds as $memberId) { |
|
|
190
|
+ foreach ($memberIds as $memberId) { |
|
191
|
191
|
$update->setParameter('old_recipient', $memberId); |
|
192
|
192
|
$update->setParameter('new_recipient', $this->cachedFed($memberId)->getSingleId()); |
|
193
|
193
|
$count += $update->executeStatement(); |
|
194
|
194
|
} |
|
195
|
195
|
|
|
196
|
|
- $this->output->writeln('> ' . $count . ' children shares updated'); |
|
|
196
|
+ $this->output->writeln('> '.$count.' children shares updated'); |
|
197
|
197
|
} |
|
198
|
198
|
|
|
199
|
199
|
|