@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | if ($currentUser) { |
| 113 | 113 | $currentUserId = $currentUser->getUID(); |
| 114 | 114 | |
| 115 | - $view = new View($currentUserId . '/files'); |
|
| 115 | + $view = new View($currentUserId.'/files'); |
|
| 116 | 116 | $fileInfo = $view->getFileInfo($oldPath); |
| 117 | 117 | if ($fileInfo) { |
| 118 | 118 | $sourceStorage = $fileInfo->getStorage(); |
@@ -129,11 +129,11 @@ discard block |
||
| 129 | 129 | } catch (\Exception $e) { |
| 130 | 130 | // do nothing, in this case we just disable the trashbin and continue |
| 131 | 131 | $logger = \OC::$server->getLogger(); |
| 132 | - $logger->debug('Trashbin storage could not check if a file was moved out of a shared folder: ' . $e->getMessage()); |
|
| 132 | + $logger->debug('Trashbin storage could not check if a file was moved out of a shared folder: '.$e->getMessage()); |
|
| 133 | 133 | } |
| 134 | 134 | |
| 135 | - if($fileMovedOutOfSharedFolder) { |
|
| 136 | - self::$moveOutOfSharedFolder['/' . $currentUserId . '/files' . $oldPath] = true; |
|
| 135 | + if ($fileMovedOutOfSharedFolder) { |
|
| 136 | + self::$moveOutOfSharedFolder['/'.$currentUserId.'/files'.$oldPath] = true; |
|
| 137 | 137 | } else { |
| 138 | 138 | self::$disableTrash = true; |
| 139 | 139 | } |
@@ -173,16 +173,16 @@ discard block |
||
| 173 | 173 | */ |
| 174 | 174 | public function unlink($path) { |
| 175 | 175 | try { |
| 176 | - if (isset(self::$moveOutOfSharedFolder[$this->mountPoint . $path])) { |
|
| 176 | + if (isset(self::$moveOutOfSharedFolder[$this->mountPoint.$path])) { |
|
| 177 | 177 | $result = $this->doDelete($path, 'unlink', true); |
| 178 | - unset(self::$moveOutOfSharedFolder[$this->mountPoint . $path]); |
|
| 178 | + unset(self::$moveOutOfSharedFolder[$this->mountPoint.$path]); |
|
| 179 | 179 | } else { |
| 180 | 180 | $result = $this->doDelete($path, 'unlink'); |
| 181 | 181 | } |
| 182 | 182 | } catch (GenericEncryptionException $e) { |
| 183 | 183 | // in case of a encryption exception we delete the file right away |
| 184 | 184 | $this->logger->info( |
| 185 | - "Can't move file" . $path . |
|
| 185 | + "Can't move file".$path. |
|
| 186 | 186 | "to the trash bin, therefore it was deleted right away"); |
| 187 | 187 | |
| 188 | 188 | $result = $this->storage->unlink($path); |
@@ -199,9 +199,9 @@ discard block |
||
| 199 | 199 | * @return bool true if the operation succeeded, false otherwise |
| 200 | 200 | */ |
| 201 | 201 | public function rmdir($path) { |
| 202 | - if (isset(self::$moveOutOfSharedFolder[$this->mountPoint . $path])) { |
|
| 202 | + if (isset(self::$moveOutOfSharedFolder[$this->mountPoint.$path])) { |
|
| 203 | 203 | $result = $this->doDelete($path, 'rmdir', true); |
| 204 | - unset(self::$moveOutOfSharedFolder[$this->mountPoint . $path]); |
|
| 204 | + unset(self::$moveOutOfSharedFolder[$this->mountPoint.$path]); |
|
| 205 | 205 | } else { |
| 206 | 206 | $result = $this->doDelete($path, 'rmdir'); |
| 207 | 207 | } |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | * @param $path |
| 217 | 217 | * @return bool |
| 218 | 218 | */ |
| 219 | - protected function shouldMoveToTrash($path){ |
|
| 219 | + protected function shouldMoveToTrash($path) { |
|
| 220 | 220 | |
| 221 | 221 | // check if there is a app which want to disable the trash bin for this file |
| 222 | 222 | $fileId = $this->storage->getCache()->getId($path); |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | } |
| 230 | 230 | } |
| 231 | 231 | |
| 232 | - $normalized = Filesystem::normalizePath($this->mountPoint . '/' . $path); |
|
| 232 | + $normalized = Filesystem::normalizePath($this->mountPoint.'/'.$path); |
|
| 233 | 233 | $parts = explode('/', $normalized); |
| 234 | 234 | if (count($parts) < 4) { |
| 235 | 235 | return false; |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | return false; |
| 278 | 278 | } |
| 279 | 279 | |
| 280 | - $normalized = Filesystem::normalizePath($this->mountPoint . '/' . $path, true, false, true); |
|
| 280 | + $normalized = Filesystem::normalizePath($this->mountPoint.'/'.$path, true, false, true); |
|
| 281 | 281 | $result = true; |
| 282 | 282 | $view = Filesystem::getView(); |
| 283 | 283 | if (!isset($this->deletedFiles[$normalized]) && $view instanceof View) { |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | * Setup the storate wrapper callback |
| 306 | 306 | */ |
| 307 | 307 | public static function setupStorage() { |
| 308 | - \OC\Files\Filesystem::addStorageWrapper('oc_trashbin', function ($mountPoint, $storage) { |
|
| 308 | + \OC\Files\Filesystem::addStorageWrapper('oc_trashbin', function($mountPoint, $storage) { |
|
| 309 | 309 | return new \OCA\Files_Trashbin\Storage( |
| 310 | 310 | array('storage' => $storage, 'mountPoint' => $mountPoint), |
| 311 | 311 | \OC::$server->getUserManager(), |