@@ -23,6 +23,6 @@ |
||
| 23 | 23 | |
| 24 | 24 | namespace OCA\Files_Sharing; |
| 25 | 25 | |
| 26 | -interface ISharedStorage{ |
|
| 26 | +interface ISharedStorage { |
|
| 27 | 27 | |
| 28 | 28 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | /** {@inheritDoc} */ |
| 39 | 39 | public function scan($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1, $lock = true) { |
| 40 | - if(!$this->storage->remoteIsOwnCloud()) { |
|
| 40 | + if (!$this->storage->remoteIsOwnCloud()) { |
|
| 41 | 41 | return parent::scan($path, $recursive, $recursive, $lock); |
| 42 | 42 | } |
| 43 | 43 | |
@@ -88,8 +88,8 @@ discard block |
||
| 88 | 88 | } catch (\Exception $e) { |
| 89 | 89 | $this->storage->checkStorageAvailability(); |
| 90 | 90 | throw new \Exception( |
| 91 | - 'Error while scanning remote share: "' . |
|
| 92 | - $this->storage->getRemote() . '" ' . |
|
| 91 | + 'Error while scanning remote share: "'. |
|
| 92 | + $this->storage->getRemote().'" '. |
|
| 93 | 93 | $e->getMessage() |
| 94 | 94 | ); |
| 95 | 95 | } |
@@ -97,8 +97,8 @@ discard block |
||
| 97 | 97 | $this->addResult($data['data'], ''); |
| 98 | 98 | } else { |
| 99 | 99 | throw new \Exception( |
| 100 | - 'Error while scanning remote share: "' . |
|
| 101 | - $this->storage->getRemote() . '"' |
|
| 100 | + 'Error while scanning remote share: "'. |
|
| 101 | + $this->storage->getRemote().'"' |
|
| 102 | 102 | ); |
| 103 | 103 | } |
| 104 | 104 | } |
@@ -113,14 +113,14 @@ discard block |
||
| 113 | 113 | $children = []; |
| 114 | 114 | foreach ($data['children'] as $child) { |
| 115 | 115 | $children[$child['name']] = true; |
| 116 | - $this->addResult($child, ltrim($path . '/' . $child['name'], '/')); |
|
| 116 | + $this->addResult($child, ltrim($path.'/'.$child['name'], '/')); |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | $existingCache = $this->cache->getFolderContentsById($id); |
| 120 | 120 | foreach ($existingCache as $existingChild) { |
| 121 | 121 | // if an existing child is not in the new data, remove it |
| 122 | 122 | if (!isset($children[$existingChild['name']])) { |
| 123 | - $this->cache->remove(ltrim($path . '/' . $existingChild['name'], '/')); |
|
| 123 | + $this->cache->remove(ltrim($path.'/'.$existingChild['name'], '/')); |
|
| 124 | 124 | } |
| 125 | 125 | } |
| 126 | 126 | } |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | $managerProvider = $this->managerProvider; |
| 62 | 62 | $manager = $managerProvider(); |
| 63 | 63 | $data['manager'] = $manager; |
| 64 | - $mountPoint = '/' . $user->getUID() . '/files/' . ltrim($data['mountpoint'], '/'); |
|
| 64 | + $mountPoint = '/'.$user->getUID().'/files/'.ltrim($data['mountpoint'], '/'); |
|
| 65 | 65 | $data['mountpoint'] = $mountPoint; |
| 66 | 66 | $data['cloudId'] = $this->cloudIdManager->getCloudId($data['owner'], $data['remote']); |
| 67 | 67 | $data['certificateManager'] = \OC::$server->getCertificateManager($user->getUID()); |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | */ |
| 97 | 97 | public function generateTarget($filePath, $shareWith, $exclude = null) { |
| 98 | 98 | $shareFolder = \OCA\Files_Sharing\Helper::getShareFolder(); |
| 99 | - $target = \OC\Files\Filesystem::normalizePath($shareFolder . '/' . basename($filePath)); |
|
| 99 | + $target = \OC\Files\Filesystem::normalizePath($shareFolder.'/'.basename($filePath)); |
|
| 100 | 100 | |
| 101 | 101 | // for group shares we return the target right away |
| 102 | 102 | if ($shareWith === false) { |
@@ -104,13 +104,13 @@ discard block |
||
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | \OC\Files\Filesystem::initMountPoints($shareWith); |
| 107 | - $view = new \OC\Files\View('/' . $shareWith . '/files'); |
|
| 107 | + $view = new \OC\Files\View('/'.$shareWith.'/files'); |
|
| 108 | 108 | |
| 109 | 109 | if (!$view->is_dir($shareFolder)) { |
| 110 | 110 | $dir = ''; |
| 111 | 111 | $subdirs = explode('/', $shareFolder); |
| 112 | 112 | foreach ($subdirs as $subdir) { |
| 113 | - $dir = $dir . '/' . $subdir; |
|
| 113 | + $dir = $dir.'/'.$subdir; |
|
| 114 | 114 | if (!$view->is_dir($dir)) { |
| 115 | 115 | $view->mkdir($dir); |
| 116 | 116 | } |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | if ($share['item_type'] === 'folder' && $target !== '') { |
| 238 | 238 | // note: in case of ext storage mount points the path might be empty |
| 239 | 239 | // which would cause a leading slash to appear |
| 240 | - $share['path'] = ltrim($share['path'] . '/' . $target, '/'); |
|
| 240 | + $share['path'] = ltrim($share['path'].'/'.$target, '/'); |
|
| 241 | 241 | } |
| 242 | 242 | return self::resolveReshares($share); |
| 243 | 243 | } |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | */ |
| 70 | 70 | protected function run($argument) { |
| 71 | 71 | // Delete old tokens after 2 days |
| 72 | - if($this->timeFactory->getTime() - $this->config->getAppValue('core', 'updater.secret.created', $this->timeFactory->getTime()) >= 172800) { |
|
| 72 | + if ($this->timeFactory->getTime() - $this->config->getAppValue('core', 'updater.secret.created', $this->timeFactory->getTime()) >= 172800) { |
|
| 73 | 73 | $this->config->deleteSystemValue('updater.secret'); |
| 74 | 74 | } |
| 75 | 75 | } |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | * @return bool |
| 164 | 164 | */ |
| 165 | 165 | public function userHasFiles($uid) { |
| 166 | - return $this->files->file_exists($uid . '/files'); |
|
| 166 | + return $this->files->file_exists($uid.'/files'); |
|
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | /** |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | if (count($parts) > 1) { |
| 180 | 180 | $owner = $parts[1]; |
| 181 | 181 | if ($this->userManager->userExists($owner) === false) { |
| 182 | - throw new \BadMethodCallException('Unknown user: ' . |
|
| 182 | + throw new \BadMethodCallException('Unknown user: '. |
|
| 183 | 183 | 'method expects path to a user folder relative to the data folder'); |
| 184 | 184 | } |
| 185 | 185 | |
@@ -128,7 +128,7 @@ |
||
| 128 | 128 | $encryptedKey = $this->crypt->encryptPrivateKey($decryptedKey, $newPassword, $uid); |
| 129 | 129 | $header = $this->crypt->generateHeader(); |
| 130 | 130 | if ($encryptedKey) { |
| 131 | - $this->keyManager->setPrivateKey($uid, $header . $encryptedKey); |
|
| 131 | + $this->keyManager->setPrivateKey($uid, $header.$encryptedKey); |
|
| 132 | 132 | $this->session->setPrivateKey($decryptedKey); |
| 133 | 133 | $result = true; |
| 134 | 134 | } |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | * @param string $userId |
| 30 | 30 | */ |
| 31 | 31 | public function __construct($userId) { |
| 32 | - if(empty($userId)) { |
|
| 32 | + if (empty($userId)) { |
|
| 33 | 33 | $userId = "<no-user-id-given>"; |
| 34 | 34 | } |
| 35 | 35 | parent::__construct("Public Key missing for user: $userId"); |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | * @param string $userId |
| 33 | 33 | */ |
| 34 | 34 | public function __construct($userId) { |
| 35 | - if(empty($userId)) { |
|
| 35 | + if (empty($userId)) { |
|
| 36 | 36 | $userId = "<no-user-id-given>"; |
| 37 | 37 | } |
| 38 | 38 | parent::__construct("Private Key missing for user: $userId"); |