| @@ 125-142 (lines=18) @@ | ||
| 122 | } |
|
| 123 | ||
| 124 | ||
| 125 | private function swapToShortenUniqueIdInShares($circleId, $shortenUniqueId) { |
|
| 126 | $qb = $this->connection->getQueryBuilder(); |
|
| 127 | $expr = $qb->expr(); |
|
| 128 | ||
| 129 | /** @noinspection PhpMethodParametersCountMismatchInspection */ |
|
| 130 | $qb->update('share') |
|
| 131 | ->where( |
|
| 132 | $expr->andX( |
|
| 133 | $expr->eq( |
|
| 134 | 'share_type', $qb->createNamedParameter(Share::SHARE_TYPE_CIRCLE) |
|
| 135 | ), |
|
| 136 | $expr->eq('share_with', $qb->createNamedParameter($circleId)) |
|
| 137 | ) |
|
| 138 | ); |
|
| 139 | ||
| 140 | $qb->set('share_with', $qb->createNamedParameter($shortenUniqueId)); |
|
| 141 | $qb->execute(); |
|
| 142 | } |
|
| 143 | ||
| 144 | ||
| 145 | } |
|
| @@ 64-74 (lines=11) @@ | ||
| 61 | /** |
|
| 62 | * @param string $circleId |
|
| 63 | */ |
|
| 64 | public function removeSharesToCircleId(string $circleId) { |
|
| 65 | $qb = $this->getSharesDeleteSql(); |
|
| 66 | $expr = $qb->expr(); |
|
| 67 | ||
| 68 | $andX = $expr->andX(); |
|
| 69 | $andX->add($expr->eq('share_type', $qb->createNamedParameter(self::SHARE_TYPE))); |
|
| 70 | $andX->add($expr->eq('share_with', $qb->createNamedParameter($circleId))); |
|
| 71 | $qb->andWhere($andX); |
|
| 72 | ||
| 73 | $qb->execute(); |
|
| 74 | } |
|
| 75 | ||
| 76 | ||
| 77 | /** |
|