Completed
Push — master ( 4da6b7...5a998d )
by Björn
14:04
created
apps/files_trashbin/lib/Storage.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 			if ($currentUser) {
96 96
 				$currentUserId = $currentUser->getUID();
97 97
 
98
-				$view = new View($currentUserId . '/files');
98
+				$view = new View($currentUserId.'/files');
99 99
 				$fileInfo = $view->getFileInfo($oldPath);
100 100
 				if ($fileInfo) {
101 101
 					$sourceStorage = $fileInfo->getStorage();
@@ -112,11 +112,11 @@  discard block
 block discarded – undo
112 112
 		} catch (\Exception $e) {
113 113
 			// do nothing, in this case we just disable the trashbin and continue
114 114
 			$logger = \OC::$server->getLogger();
115
-			$logger->debug('Trashbin storage could not check if a file was moved out of a shared folder: ' . $e->getMessage());
115
+			$logger->debug('Trashbin storage could not check if a file was moved out of a shared folder: '.$e->getMessage());
116 116
 		}
117 117
 
118
-		if($fileMovedOutOfSharedFolder) {
119
-			self::$moveOutOfSharedFolder['/' . $currentUserId . '/files' . $oldPath] = true;
118
+		if ($fileMovedOutOfSharedFolder) {
119
+			self::$moveOutOfSharedFolder['/'.$currentUserId.'/files'.$oldPath] = true;
120 120
 		} else {
121 121
 			self::$disableTrash = true;
122 122
 		}
@@ -156,16 +156,16 @@  discard block
 block discarded – undo
156 156
 	 */
157 157
 	public function unlink($path) {
158 158
 		try {
159
-			if (isset(self::$moveOutOfSharedFolder[$this->mountPoint . $path])) {
159
+			if (isset(self::$moveOutOfSharedFolder[$this->mountPoint.$path])) {
160 160
 				$result = $this->doDelete($path, 'unlink', true);
161
-				unset(self::$moveOutOfSharedFolder[$this->mountPoint . $path]);
161
+				unset(self::$moveOutOfSharedFolder[$this->mountPoint.$path]);
162 162
 			} else {
163 163
 				$result = $this->doDelete($path, 'unlink');
164 164
 			}
165 165
 		} catch (GenericEncryptionException $e) {
166 166
 			// in case of a encryption exception we delete the file right away
167 167
 			$this->logger->info(
168
-				"Can't move file" .  $path .
168
+				"Can't move file".$path.
169 169
 				"to the trash bin, therefore it was deleted right away");
170 170
 
171 171
 			$result = $this->storage->unlink($path);
@@ -182,9 +182,9 @@  discard block
 block discarded – undo
182 182
 	 * @return bool true if the operation succeeded, false otherwise
183 183
 	 */
184 184
 	public function rmdir($path) {
185
-		if (isset(self::$moveOutOfSharedFolder[$this->mountPoint . $path])) {
185
+		if (isset(self::$moveOutOfSharedFolder[$this->mountPoint.$path])) {
186 186
 			$result = $this->doDelete($path, 'rmdir', true);
187
-			unset(self::$moveOutOfSharedFolder[$this->mountPoint . $path]);
187
+			unset(self::$moveOutOfSharedFolder[$this->mountPoint.$path]);
188 188
 		} else {
189 189
 			$result = $this->doDelete($path, 'rmdir');
190 190
 		}
@@ -199,8 +199,8 @@  discard block
 block discarded – undo
199 199
 	 * @param $path
200 200
 	 * @return bool
201 201
 	 */
202
-	protected function shouldMoveToTrash($path){
203
-		$normalized = Filesystem::normalizePath($this->mountPoint . '/' . $path);
202
+	protected function shouldMoveToTrash($path) {
203
+		$normalized = Filesystem::normalizePath($this->mountPoint.'/'.$path);
204 204
 		$parts = explode('/', $normalized);
205 205
 		if (count($parts) < 4) {
206 206
 			return false;
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 			return false;
238 238
 		}
239 239
 
240
-		$normalized = Filesystem::normalizePath($this->mountPoint . '/' . $path, true, false, true);
240
+		$normalized = Filesystem::normalizePath($this->mountPoint.'/'.$path, true, false, true);
241 241
 		$result = true;
242 242
 		$view = Filesystem::getView();
243 243
 		if (!isset($this->deletedFiles[$normalized]) && $view instanceof View) {
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 	 * Setup the storate wrapper callback
266 266
 	 */
267 267
 	public static function setupStorage() {
268
-		\OC\Files\Filesystem::addStorageWrapper('oc_trashbin', function ($mountPoint, $storage) {
268
+		\OC\Files\Filesystem::addStorageWrapper('oc_trashbin', function($mountPoint, $storage) {
269 269
 			return new \OCA\Files_Trashbin\Storage(
270 270
 				array('storage' => $storage, 'mountPoint' => $mountPoint),
271 271
 				\OC::$server->getUserManager(),
Please login to merge, or discard this patch.