@@ -74,8 +74,8 @@ |
||
74 | 74 | $result[$instance] = $item->gData('files'); |
75 | 75 | } |
76 | 76 | |
77 | - \OC::$server->getLogger()->log(3, 'FILES: ' . json_encode($result)); |
|
78 | - \OC::$server->getLogger()->log(3, 'MAILS: ' . json_encode($federatedUsers)); |
|
77 | + \OC::$server->getLogger()->log(3, 'FILES: '.json_encode($result)); |
|
78 | + \OC::$server->getLogger()->log(3, 'MAILS: '.json_encode($federatedUsers)); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | } |
@@ -109,7 +109,7 @@ |
||
109 | 109 | * @return string |
110 | 110 | */ |
111 | 111 | protected function stripPath($path) { |
112 | - $prefix = '/' . $this->userId . '/files'; |
|
112 | + $prefix = '/'.$this->userId.'/files'; |
|
113 | 113 | |
114 | 114 | return rtrim(substr($path, strlen($prefix)), '/'); |
115 | 115 | } |
@@ -394,14 +394,14 @@ |
||
394 | 394 | * @throws FederatedUserNotFoundException |
395 | 395 | */ |
396 | 396 | public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow { |
397 | - if ($this->get($prefix . 'single_id', $data) === '') { |
|
397 | + if ($this->get($prefix.'single_id', $data) === '') { |
|
398 | 398 | throw new FederatedUserNotFoundException(); |
399 | 399 | } |
400 | 400 | |
401 | - $this->setSingleId($this->get($prefix . 'single_id', $data)); |
|
402 | - $this->setUserId($this->get($prefix . 'user_id', $data)); |
|
403 | - $this->setUserType($this->getInt($prefix . 'user_type', $data)); |
|
404 | - $this->setInstance($this->get($prefix . 'instance', $data)); |
|
401 | + $this->setSingleId($this->get($prefix.'single_id', $data)); |
|
402 | + $this->setUserId($this->get($prefix.'user_id', $data)); |
|
403 | + $this->setUserType($this->getInt($prefix.'user_type', $data)); |
|
404 | + $this->setInstance($this->get($prefix.'instance', $data)); |
|
405 | 405 | |
406 | 406 | $this->getManager()->manageImportFromDatabase($this, $data, $prefix); |
407 | 407 |
@@ -190,7 +190,7 @@ |
||
190 | 190 | return $this->mountPoint; |
191 | 191 | } |
192 | 192 | |
193 | - return '/' . $this->getInitiator()->getUserId() . '/files/' . ltrim($this->mountPoint, '/'); |
|
193 | + return '/'.$this->getInitiator()->getUserId().'/files/'.ltrim($this->mountPoint, '/'); |
|
194 | 194 | } |
195 | 195 | |
196 | 196 | /** |
@@ -504,29 +504,29 @@ |
||
504 | 504 | * @throws FileCacheNotFoundException |
505 | 505 | */ |
506 | 506 | public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow { |
507 | - if ($this->getInt($prefix . 'fileid', $data) === 0) { |
|
507 | + if ($this->getInt($prefix.'fileid', $data) === 0) { |
|
508 | 508 | throw new FileCacheNotFoundException(); |
509 | 509 | } |
510 | 510 | |
511 | - $this->setId($this->getInt($prefix . 'fileid', $data)); |
|
512 | - $this->setPath($this->get($prefix . 'path', $data)); |
|
513 | - $this->setPermissions($this->getInt($prefix . 'permissions', $data)); |
|
514 | - $this->setStorageId($this->getInt($prefix . 'storage', $data)); |
|
515 | - $this->setPathHash($this->get($prefix . 'path_hash', $data)); |
|
516 | - $this->setParent($this->getInt($prefix . 'parent', $data)); |
|
517 | - $this->setName($this->get($prefix . 'name', $data)); |
|
518 | - $this->setMimeType($this->getInt($prefix . 'mimetype', $data)); |
|
519 | - $this->setMimePart($this->getInt($prefix . 'mimepart', $data)); |
|
520 | - $this->setSize($this->getInt($prefix . 'size', $data)); |
|
521 | - $this->setMTime($this->getInt($prefix . 'mtime', $data)); |
|
522 | - $this->setStorageMTime($this->getInt($prefix . 'storage_mtime', $data)); |
|
523 | - $this->setEncrypted($this->getBool($prefix . 'encrypted', $data)); |
|
524 | - $this->setUnencryptedSize($this->getInt($prefix . 'unencrypted_size', $data)); |
|
525 | - $this->setEtag($this->get($prefix . 'etag', $data)); |
|
526 | - $this->setChecksum($this->get($prefix . 'checksum', $data)); |
|
511 | + $this->setId($this->getInt($prefix.'fileid', $data)); |
|
512 | + $this->setPath($this->get($prefix.'path', $data)); |
|
513 | + $this->setPermissions($this->getInt($prefix.'permissions', $data)); |
|
514 | + $this->setStorageId($this->getInt($prefix.'storage', $data)); |
|
515 | + $this->setPathHash($this->get($prefix.'path_hash', $data)); |
|
516 | + $this->setParent($this->getInt($prefix.'parent', $data)); |
|
517 | + $this->setName($this->get($prefix.'name', $data)); |
|
518 | + $this->setMimeType($this->getInt($prefix.'mimetype', $data)); |
|
519 | + $this->setMimePart($this->getInt($prefix.'mimepart', $data)); |
|
520 | + $this->setSize($this->getInt($prefix.'size', $data)); |
|
521 | + $this->setMTime($this->getInt($prefix.'mtime', $data)); |
|
522 | + $this->setStorageMTime($this->getInt($prefix.'storage_mtime', $data)); |
|
523 | + $this->setEncrypted($this->getBool($prefix.'encrypted', $data)); |
|
524 | + $this->setUnencryptedSize($this->getInt($prefix.'unencrypted_size', $data)); |
|
525 | + $this->setEtag($this->get($prefix.'etag', $data)); |
|
526 | + $this->setChecksum($this->get($prefix.'checksum', $data)); |
|
527 | 527 | |
528 | 528 | // small hack as there is no reason to call a recursive method for a single entry from the table |
529 | - $this->setStorage($this->get($prefix . CoreQueryBuilder::STORAGES . '_id', $data)); |
|
529 | + $this->setStorage($this->get($prefix.CoreQueryBuilder::STORAGES.'_id', $data)); |
|
530 | 530 | |
531 | 531 | return $this; |
532 | 532 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | try { |
105 | 105 | $level = Member::parseLevelString($levelString); |
106 | 106 | } catch (ParseMemberLevelException $e) { |
107 | - throw new MemberHelperException('method ' . $levelString . ' not found'); |
|
107 | + throw new MemberHelperException('method '.$levelString.' not found'); |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | $this->mustHaveLevelEqualOrAbove($level); |
@@ -122,11 +122,11 @@ discard block |
||
122 | 122 | try { |
123 | 123 | $level = Member::parseLevelString($levelString); |
124 | 124 | } catch (ParseMemberLevelException $e) { |
125 | - throw new MemberHelperException('method ' . $levelString . ' not found'); |
|
125 | + throw new MemberHelperException('method '.$levelString.' not found'); |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | if ($this->member->getLevel() >= $level) { |
129 | - throw new MemberLevelException('Member cannot be ' . $levelString); |
|
129 | + throw new MemberLevelException('Member cannot be '.$levelString); |
|
130 | 130 | } |
131 | 131 | } |
132 | 132 |
@@ -259,17 +259,17 @@ |
||
259 | 259 | * @throws MembershipNotFoundException |
260 | 260 | */ |
261 | 261 | public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow { |
262 | - if ($this->get($prefix . 'single_id', $data) === '') { |
|
262 | + if ($this->get($prefix.'single_id', $data) === '') { |
|
263 | 263 | throw new MembershipNotFoundException(); |
264 | 264 | } |
265 | 265 | |
266 | - $this->setSingleId($this->get($prefix . 'single_id', $data)); |
|
267 | - $this->setCircleId($this->get($prefix . 'circle_id', $data)); |
|
268 | - $this->setLevel($this->getInt($prefix . 'level', $data)); |
|
269 | - $this->setInheritanceFirst($this->get($prefix . 'inheritance_first', $data)); |
|
270 | - $this->setInheritanceLast($this->get($prefix . 'inheritance_last', $data)); |
|
271 | - $this->setInheritancePath($this->getArray($prefix . 'inheritance_path', $data)); |
|
272 | - $this->setInheritanceDepth($this->getInt($prefix . 'inheritance_depth', $data)); |
|
266 | + $this->setSingleId($this->get($prefix.'single_id', $data)); |
|
267 | + $this->setCircleId($this->get($prefix.'circle_id', $data)); |
|
268 | + $this->setLevel($this->getInt($prefix.'level', $data)); |
|
269 | + $this->setInheritanceFirst($this->get($prefix.'inheritance_first', $data)); |
|
270 | + $this->setInheritanceLast($this->get($prefix.'inheritance_last', $data)); |
|
271 | + $this->setInheritancePath($this->getArray($prefix.'inheritance_path', $data)); |
|
272 | + $this->setInheritanceDepth($this->getInt($prefix.'inheritance_depth', $data)); |
|
273 | 273 | |
274 | 274 | return $this; |
275 | 275 | } |
@@ -611,9 +611,9 @@ discard block |
||
611 | 611 | $circle = $this->getCircle(); |
612 | 612 | $display = $circle->getDisplayName(); |
613 | 613 | if ($circle->getSource() === 0) { |
614 | - $display .= ' (Circle owned by ' . $circle->getOwner()->getDisplayName() . ')'; |
|
614 | + $display .= ' (Circle owned by '.$circle->getOwner()->getDisplayName().')'; |
|
615 | 615 | } else { |
616 | - $display .= ' (' . Circle::$DEF_SOURCE[$circle->getSource()] . ')'; |
|
616 | + $display .= ' ('.Circle::$DEF_SOURCE[$circle->getSource()].')'; |
|
617 | 617 | } |
618 | 618 | |
619 | 619 | $share->setSharedWithDisplayName($display); |
@@ -702,20 +702,20 @@ discard block |
||
702 | 702 | */ |
703 | 703 | public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow { |
704 | 704 | $shareTime = new DateTime(); |
705 | - $shareTime->setTimestamp($this->getInt($prefix . 'stime', $data)); |
|
706 | - |
|
707 | - $this->setId($this->get($prefix . 'id', $data)) |
|
708 | - ->setShareType($this->getInt($prefix . 'share_type', $data)) |
|
709 | - ->setPermissions($this->getInt($prefix . 'permissions', $data)) |
|
710 | - ->setItemType($this->get($prefix . 'item_type', $data)) |
|
711 | - ->setItemSource($this->getInt($prefix . 'item_source', $data)) |
|
712 | - ->setItemTarget($this->get($prefix . 'item_target', $data)) |
|
713 | - ->setFileSource($this->getInt($prefix . 'file_source', $data)) |
|
714 | - ->setFileTarget($this->get($prefix . 'file_target', $data)) |
|
715 | - ->setSharedWith($this->get($prefix . 'share_with', $data)) |
|
716 | - ->setSharedBy($this->get($prefix . 'uid_initiator', $data)) |
|
717 | - ->setShareOwner($this->get($prefix . 'uid_owner', $data)) |
|
718 | - ->setToken($this->get($prefix . 'token', $data)) |
|
705 | + $shareTime->setTimestamp($this->getInt($prefix.'stime', $data)); |
|
706 | + |
|
707 | + $this->setId($this->get($prefix.'id', $data)) |
|
708 | + ->setShareType($this->getInt($prefix.'share_type', $data)) |
|
709 | + ->setPermissions($this->getInt($prefix.'permissions', $data)) |
|
710 | + ->setItemType($this->get($prefix.'item_type', $data)) |
|
711 | + ->setItemSource($this->getInt($prefix.'item_source', $data)) |
|
712 | + ->setItemTarget($this->get($prefix.'item_target', $data)) |
|
713 | + ->setFileSource($this->getInt($prefix.'file_source', $data)) |
|
714 | + ->setFileTarget($this->get($prefix.'file_target', $data)) |
|
715 | + ->setSharedWith($this->get($prefix.'share_with', $data)) |
|
716 | + ->setSharedBy($this->get($prefix.'uid_initiator', $data)) |
|
717 | + ->setShareOwner($this->get($prefix.'uid_owner', $data)) |
|
718 | + ->setToken($this->get($prefix.'token', $data)) |
|
719 | 719 | ->setShareTime($shareTime); |
720 | 720 | |
721 | 721 | // if (($password = $this->get('personal_password', $data, '')) !== '') { |
@@ -724,8 +724,8 @@ discard block |
||
724 | 724 | // $share->setPassword($this->get('password', $data, '')); |
725 | 725 | // } |
726 | 726 | |
727 | - $this->setChildId($this->getInt($prefix . 'child_id', $data)) |
|
728 | - ->setChildFileTarget($this->get($prefix . 'child_file_target', $data)) |
|
727 | + $this->setChildId($this->getInt($prefix.'child_id', $data)) |
|
728 | + ->setChildFileTarget($this->get($prefix.'child_file_target', $data)) |
|
729 | 729 | ->setProviderId(ShareByCircleProvider::IDENTIFIER) |
730 | 730 | ->setStatus(Ishare::STATUS_ACCEPTED); |
731 | 731 |
@@ -331,19 +331,19 @@ discard block |
||
331 | 331 | */ |
332 | 332 | private function createShare($share) { |
333 | 333 | $this->miscService->log( |
334 | - 'Creating share (1/4) - type: ' . $share->getShareType() . ' - token: ' |
|
335 | - . $share->getToken() . ' - type: ' . $share->getShareType() . ' - with: ' |
|
336 | - . $share->getSharedWith() . ' - permissions: ' . $share->getPermissions(), 0 |
|
334 | + 'Creating share (1/4) - type: '.$share->getShareType().' - token: ' |
|
335 | + . $share->getToken().' - type: '.$share->getShareType().' - with: ' |
|
336 | + . $share->getSharedWith().' - permissions: '.$share->getPermissions(), 0 |
|
337 | 337 | ); |
338 | 338 | |
339 | 339 | $qb = $this->getBaseInsertSql($share); |
340 | - $this->miscService->log('Share creation (2/4) : ' . json_encode($qb->getSQL()), 0); |
|
340 | + $this->miscService->log('Share creation (2/4) : '.json_encode($qb->getSQL()), 0); |
|
341 | 341 | |
342 | 342 | $result = $qb->execute(); |
343 | - $this->miscService->log('Share creation result (3/4) : ' . json_encode($result), 0); |
|
343 | + $this->miscService->log('Share creation result (3/4) : '.json_encode($result), 0); |
|
344 | 344 | |
345 | 345 | $id = $qb->getLastInsertId(); |
346 | - $this->miscService->log('Share created ID (4/4) : ' . $id, 0); |
|
346 | + $this->miscService->log('Share created ID (4/4) : '.$id, 0); |
|
347 | 347 | |
348 | 348 | try { |
349 | 349 | $share->setId($id); |
@@ -590,7 +590,7 @@ discard block |
||
590 | 590 | \OC::$server->getLogger()->log(3, 'deprecated>getShareByToken'); |
591 | 591 | $qb = $this->dbConnection->getQueryBuilder(); |
592 | 592 | |
593 | - $this->miscService->log("Opening share by token '#" . $token . "'", 0); |
|
593 | + $this->miscService->log("Opening share by token '#".$token."'", 0); |
|
594 | 594 | |
595 | 595 | $cursor = $qb->select('*') |
596 | 596 | ->from('share') |
@@ -614,7 +614,7 @@ discard block |
||
614 | 614 | try { |
615 | 615 | $data = $this->getShareByPersonalToken($token); |
616 | 616 | } catch (Exception $e) { |
617 | - $this->miscService->log("Share '#" . $token . "' not found.", 0); |
|
617 | + $this->miscService->log("Share '#".$token."' not found.", 0); |
|
618 | 618 | throw new ShareNotFound('Share not found', $this->l10n->t('Could not find share')); |
619 | 619 | } |
620 | 620 | } |
@@ -623,7 +623,7 @@ discard block |
||
623 | 623 | $share = $this->createShareObject($data); |
624 | 624 | } catch (InvalidShare $e) { |
625 | 625 | $this->miscService->log( |
626 | - "Share Object '#" . $token . "' not created. " . json_encode($data), 0 |
|
626 | + "Share Object '#".$token."' not created. ".json_encode($data), 0 |
|
627 | 627 | ); |
628 | 628 | throw new ShareNotFound('Share not found', $this->l10n->t('Could not find share')); |
629 | 629 | } |