Completed
Pull Request — master (#3590)
by Individual IT
11:38
created
apps/files_sharing/lib/ISharedStorage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,6 +23,6 @@
 block discarded – undo
23 23
 
24 24
 namespace OCA\Files_Sharing;
25 25
 
26
-interface ISharedStorage{
26
+interface ISharedStorage {
27 27
 
28 28
 }
Please login to merge, or discard this patch.
apps/files_sharing/lib/AppInfo/Application.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 		/**
51 51
 		 * Controllers
52 52
 		 */
53
-		$container->registerService('ShareController', function (SimpleContainer $c) use ($server) {
53
+		$container->registerService('ShareController', function(SimpleContainer $c) use ($server) {
54 54
 			$federatedSharingApp = new \OCA\FederatedFileSharing\AppInfo\Application();
55 55
 			return new ShareController(
56 56
 				$c->query('AppName'),
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 				$server->getThemingDefaults()
71 71
 			);
72 72
 		});
73
-		$container->registerService('ExternalSharesController', function (SimpleContainer $c) {
73
+		$container->registerService('ExternalSharesController', function(SimpleContainer $c) {
74 74
 			return new ExternalSharesController(
75 75
 				$c->query('AppName'),
76 76
 				$c->query('Request'),
@@ -82,13 +82,13 @@  discard block
 block discarded – undo
82 82
 		/**
83 83
 		 * Core class wrappers
84 84
 		 */
85
-		$container->registerService('HttpClientService', function (SimpleContainer $c) use ($server) {
85
+		$container->registerService('HttpClientService', function(SimpleContainer $c) use ($server) {
86 86
 			return $server->getHTTPClientService();
87 87
 		});
88
-		$container->registerService(ICloudIdManager::class, function (SimpleContainer $c) use ($server) {
88
+		$container->registerService(ICloudIdManager::class, function(SimpleContainer $c) use ($server) {
89 89
 			return $server->getCloudIdManager();
90 90
 		});
91
-		$container->registerService('ExternalManager', function (SimpleContainer $c) use ($server) {
91
+		$container->registerService('ExternalManager', function(SimpleContainer $c) use ($server) {
92 92
 			$user = $server->getUserSession()->getUser();
93 93
 			$uid = $user ? $user->getUID() : null;
94 94
 			$discoveryManager = new DiscoveryManager(
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 		/**
111 111
 		 * Middleware
112 112
 		 */
113
-		$container->registerService('SharingCheckMiddleware', function (SimpleContainer $c) use ($server) {
113
+		$container->registerService('SharingCheckMiddleware', function(SimpleContainer $c) use ($server) {
114 114
 			return new SharingCheckMiddleware(
115 115
 				$c->query('AppName'),
116 116
 				$server->getConfig(),
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 			);
122 122
 		});
123 123
 
124
-		$container->registerService('OCSShareAPIMiddleware', function (SimpleContainer $c) use ($server) {
124
+		$container->registerService('OCSShareAPIMiddleware', function(SimpleContainer $c) use ($server) {
125 125
 			return new OCSShareAPIMiddleware(
126 126
 				$server->getShareManager(),
127 127
 				$server->getL10N($c->query('AppName'))
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 		$container->registerMiddleWare('SharingCheckMiddleware');
133 133
 		$container->registerMiddleWare('OCSShareAPIMiddleware');
134 134
 
135
-		$container->registerService('MountProvider', function (IContainer $c) {
135
+		$container->registerService('MountProvider', function(IContainer $c) {
136 136
 			/** @var \OCP\IServerContainer $server */
137 137
 			$server = $c->query('ServerContainer');
138 138
 			return new MountProvider(
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 			);
143 143
 		});
144 144
 
145
-		$container->registerService('ExternalMountProvider', function (IContainer $c) {
145
+		$container->registerService('ExternalMountProvider', function(IContainer $c) {
146 146
 			/** @var \OCP\IServerContainer $server */
147 147
 			$server = $c->query('ServerContainer');
148 148
 			return new \OCA\Files_Sharing\External\MountProvider(
Please login to merge, or discard this patch.
apps/files_sharing/lib/External/Scanner.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
apps/files_sharing/lib/External/Storage.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 			$root = '';
81 81
 		}
82 82
 		$secure = $protocol === 'https';
83
-		$root = rtrim($root, '/') . $discoveryManager->getWebDavEndpoint($this->cloudId->getRemote());
83
+		$root = rtrim($root, '/').$discoveryManager->getWebDavEndpoint($this->cloudId->getRemote());
84 84
 		$this->mountPoint = $options['mountpoint'];
85 85
 		$this->token = $options['token'];
86 86
 		parent::__construct(array(
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 			'host' => $host,
89 89
 			'root' => $root,
90 90
 			'user' => $options['token'],
91
-			'password' => (string)$options['password']
91
+			'password' => (string) $options['password']
92 92
 		));
93 93
 	}
94 94
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 	 * @return string
129 129
 	 */
130 130
 	public function getId() {
131
-		return 'shared::' . md5($this->token . '@' . $this->getRemote());
131
+		return 'shared::'.md5($this->token.'@'.$this->getRemote());
132 132
 	}
133 133
 
134 134
 	public function getCache($path = '', $storage = null) {
@@ -249,9 +249,9 @@  discard block
 block discarded – undo
249 249
 	 */
250 250
 	protected function testRemote() {
251 251
 		try {
252
-			return $this->testRemoteUrl($this->getRemote() . '/ocs-provider/index.php')
253
-				|| $this->testRemoteUrl($this->getRemote() . '/ocs-provider/')
254
-				|| $this->testRemoteUrl($this->getRemote() . '/status.php');
252
+			return $this->testRemoteUrl($this->getRemote().'/ocs-provider/index.php')
253
+				|| $this->testRemoteUrl($this->getRemote().'/ocs-provider/')
254
+				|| $this->testRemoteUrl($this->getRemote().'/status.php');
255 255
 		} catch (\Exception $e) {
256 256
 			return false;
257 257
 		}
@@ -263,8 +263,8 @@  discard block
 block discarded – undo
263 263
 	 */
264 264
 	private function testRemoteUrl($url) {
265 265
 		$cache = $this->memcacheFactory->create('files_sharing_remote_url');
266
-		if($cache->hasKey($url)) {
267
-			return (bool)$cache->get($url);
266
+		if ($cache->hasKey($url)) {
267
+			return (bool) $cache->get($url);
268 268
 		}
269 269
 
270 270
 		$client = $this->httpClient->newClient();
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 	 * @return bool
293 293
 	 */
294 294
 	public function remoteIsOwnCloud() {
295
-		if(defined('PHPUNIT_RUN') || !$this->testRemoteUrl($this->getRemote() . '/status.php')) {
295
+		if (defined('PHPUNIT_RUN') || !$this->testRemoteUrl($this->getRemote().'/status.php')) {
296 296
 			return false;
297 297
 		}
298 298
 		return true;
@@ -310,11 +310,11 @@  discard block
 block discarded – undo
310 310
 		$password = $this->getPassword();
311 311
 
312 312
 		// If remote is not an ownCloud do not try to get any share info
313
-		if(!$this->remoteIsOwnCloud()) {
313
+		if (!$this->remoteIsOwnCloud()) {
314 314
 			return ['status' => 'unsupported'];
315 315
 		}
316 316
 
317
-		$url = rtrim($remote, '/') . '/index.php/apps/files_sharing/shareinfo?t=' . $token;
317
+		$url = rtrim($remote, '/').'/index.php/apps/files_sharing/shareinfo?t='.$token;
318 318
 
319 319
 		// TODO: DI
320 320
 		$client = \OC::$server->getHTTPClientService()->newClient();
Please login to merge, or discard this patch.
apps/files_sharing/lib/External/MountProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
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());
Please login to merge, or discard this patch.
apps/files_sharing/lib/External/Manager.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -108,18 +108,18 @@  discard block
 block discarded – undo
108 108
 	 * @param int $remoteId
109 109
 	 * @return Mount|null
110 110
 	 */
111
-	public function addShare($remote, $token, $password, $name, $owner, $accepted=false, $user = null, $remoteId = -1) {
111
+	public function addShare($remote, $token, $password, $name, $owner, $accepted = false, $user = null, $remoteId = -1) {
112 112
 
113 113
 		$user = $user ? $user : $this->uid;
114 114
 		$accepted = $accepted ? 1 : 0;
115
-		$name = Filesystem::normalizePath('/' . $name);
115
+		$name = Filesystem::normalizePath('/'.$name);
116 116
 
117 117
 		if (!$accepted) {
118 118
 			// To avoid conflicts with the mount point generation later,
119 119
 			// we only use a temporary mount point name here. The real
120 120
 			// mount point name will be generated when accepting the share,
121 121
 			// using the original share item name.
122
-			$tmpMountPointName = '{{TemporaryMountPointName#' . $name . '}}';
122
+			$tmpMountPointName = '{{TemporaryMountPointName#'.$name.'}}';
123 123
 			$mountPoint = $tmpMountPointName;
124 124
 			$hash = md5($tmpMountPointName);
125 125
 			$data = [
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 			$i = 1;
139 139
 			while (!$this->connection->insertIfNotExist('*PREFIX*share_external', $data, ['user', 'mountpoint_hash'])) {
140 140
 				// The external share already exists for the user
141
-				$data['mountpoint'] = $tmpMountPointName . '-' . $i;
141
+				$data['mountpoint'] = $tmpMountPointName.'-'.$i;
142 142
 				$data['mountpoint_hash'] = md5($data['mountpoint']);
143 143
 				$i++;
144 144
 			}
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 		}
147 147
 
148 148
 		$mountPoint = Files::buildNotExistingFileName('/', $name);
149
-		$mountPoint = Filesystem::normalizePath('/' . $mountPoint);
149
+		$mountPoint = Filesystem::normalizePath('/'.$mountPoint);
150 150
 		$hash = md5($mountPoint);
151 151
 
152 152
 		$query = $this->connection->prepare('
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 
195 195
 		if ($share) {
196 196
 			$mountPoint = Files::buildNotExistingFileName('/', $share['name']);
197
-			$mountPoint = Filesystem::normalizePath('/' . $mountPoint);
197
+			$mountPoint = Filesystem::normalizePath('/'.$mountPoint);
198 198
 			$hash = md5($mountPoint);
199 199
 
200 200
 			$acceptShare = $this->connection->prepare('
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 	 */
261 261
 	private function sendFeedbackToRemote($remote, $token, $remoteId, $feedback) {
262 262
 
263
-		$url = rtrim($remote, '/') . $this->discoveryManager->getShareEndpoint($remote) . '/' . $remoteId . '/' . $feedback . '?format=' . \OCP\Share::RESPONSE_FORMAT;
263
+		$url = rtrim($remote, '/').$this->discoveryManager->getShareEndpoint($remote).'/'.$remoteId.'/'.$feedback.'?format='.\OCP\Share::RESPONSE_FORMAT;
264 264
 		$fields = array('token' => $token);
265 265
 
266 266
 		$client = $this->clientService->newClient();
@@ -289,13 +289,13 @@  discard block
 block discarded – undo
289 289
 	 * @return string
290 290
 	 */
291 291
 	protected function stripPath($path) {
292
-		$prefix = '/' . $this->uid . '/files';
292
+		$prefix = '/'.$this->uid.'/files';
293 293
 		return rtrim(substr($path, strlen($prefix)), '/');
294 294
 	}
295 295
 
296 296
 	public function getMount($data) {
297 297
 		$data['manager'] = $this;
298
-		$mountPoint = '/' . $this->uid . '/files' . $data['mountpoint'];
298
+		$mountPoint = '/'.$this->uid.'/files'.$data['mountpoint'];
299 299
 		$data['mountpoint'] = $mountPoint;
300 300
 		$data['certificateManager'] = \OC::$server->getCertificateManager($this->uid);
301 301
 		return new Mount(self::STORAGE, $mountPoint, $data, $this, $this->storageLoader);
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 			WHERE `mountpoint_hash` = ?
336 336
 			AND `user` = ?
337 337
 		');
338
-		$result = (bool)$query->execute(array($target, $targetHash, $sourceHash, $this->uid));
338
+		$result = (bool) $query->execute(array($target, $targetHash, $sourceHash, $this->uid));
339 339
 
340 340
 		return $result;
341 341
 	}
@@ -365,9 +365,9 @@  discard block
 block discarded – undo
365 365
 			WHERE `mountpoint_hash` = ?
366 366
 			AND `user` = ?
367 367
 		');
368
-		$result = (bool)$query->execute(array($hash, $this->uid));
368
+		$result = (bool) $query->execute(array($hash, $this->uid));
369 369
 
370
-		if($result) {
370
+		if ($result) {
371 371
 			$this->removeReShares($id);
372 372
 		}
373 373
 
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
 
389 389
 
390 390
 		$query->delete('federated_reshares')
391
-			->where($query->expr()->in('share_id', $query->createFunction('(' . $select . ')')));
391
+			->where($query->expr()->in('share_id', $query->createFunction('('.$select.')')));
392 392
 		$query->execute();
393 393
 
394 394
 		$deleteReShares = $this->connection->getQueryBuilder();
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
 
413 413
 		if ($result) {
414 414
 			$shares = $getShare->fetchAll();
415
-			foreach($shares as $share) {
415
+			foreach ($shares as $share) {
416 416
 				$this->sendFeedbackToRemote($share['remote'], $share['share_token'], $share['remote_id'], 'decline');
417 417
 			}
418 418
 		}
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
 			DELETE FROM `*PREFIX*share_external`
422 422
 			WHERE `user` = ?
423 423
 		');
424
-		return (bool)$query->execute(array($uid));
424
+		return (bool) $query->execute(array($uid));
425 425
 	}
426 426
 
427 427
 	/**
Please login to merge, or discard this patch.
apps/files_sharing/lib/Updater.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -90,11 +90,11 @@
 block discarded – undo
90 90
 	 */
91 91
 	static private function renameChildren($oldPath, $newPath) {
92 92
 
93
-		$absNewPath =  \OC\Files\Filesystem::normalizePath('/' . \OCP\User::getUser() . '/files/' . $newPath);
94
-		$absOldPath =  \OC\Files\Filesystem::normalizePath('/' . \OCP\User::getUser() . '/files/' . $oldPath);
93
+		$absNewPath = \OC\Files\Filesystem::normalizePath('/'.\OCP\User::getUser().'/files/'.$newPath);
94
+		$absOldPath = \OC\Files\Filesystem::normalizePath('/'.\OCP\User::getUser().'/files/'.$oldPath);
95 95
 
96 96
 		$mountManager = \OC\Files\Filesystem::getMountManager();
97
-		$mountedShares = $mountManager->findIn('/' . \OCP\User::getUser() . '/files/' . $oldPath);
97
+		$mountedShares = $mountManager->findIn('/'.\OCP\User::getUser().'/files/'.$oldPath);
98 98
 		foreach ($mountedShares as $mount) {
99 99
 			if ($mount->getStorage()->instanceOfStorage('OCA\Files_Sharing\ISharedStorage')) {
100 100
 				$mountPoint = $mount->getMountPoint();
Please login to merge, or discard this patch.
apps/files_sharing/lib/Helper.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
 		$basePath = $path;
89 89
 
90
-		if ($relativePath !== null && Filesystem::isReadable($basePath . $relativePath)) {
90
+		if ($relativePath !== null && Filesystem::isReadable($basePath.$relativePath)) {
91 91
 			$path .= Filesystem::normalizePath($relativePath);
92 92
 		}
93 93
 
@@ -112,14 +112,14 @@  discard block
 block discarded – undo
112 112
 		if ($password !== null) {
113 113
 			if ($share->getShareType() === \OCP\Share::SHARE_TYPE_LINK) {
114 114
 				if ($shareManager->checkPassword($share, $password)) {
115
-					\OC::$server->getSession()->set('public_link_authenticated', (string)$share->getId());
115
+					\OC::$server->getSession()->set('public_link_authenticated', (string) $share->getId());
116 116
 					return true;
117 117
 				}
118 118
 			}
119 119
 		} else {
120 120
 			// not authenticated ?
121 121
 			if (\OC::$server->getSession()->exists('public_link_authenticated')
122
-				&& \OC::$server->getSession()->get('public_link_authenticated') !== (string)$share->getId()) {
122
+				&& \OC::$server->getSession()->get('public_link_authenticated') !== (string) $share->getId()) {
123 123
 				return true;
124 124
 			}
125 125
 		}
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 		Filesystem::initMountPoints($owner);
133 133
 		$info = Filesystem::getFileInfo($target);
134 134
 		$ownerView = new View('/'.$owner.'/files');
135
-		if ( $owner != User::getUser() ) {
135
+		if ($owner != User::getUser()) {
136 136
 			$path = $ownerView->getPath($info['fileid']);
137 137
 		} else {
138 138
 			$path = $target;
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 			if ($info instanceof \OC\Files\FileInfo) {
146 146
 				$ids[] = $info['fileid'];
147 147
 			} else {
148
-				\OCP\Util::writeLog('sharing', 'No fileinfo available for: ' . $path, \OCP\Util::WARN);
148
+				\OCP\Util::writeLog('sharing', 'No fileinfo available for: '.$path, \OCP\Util::WARN);
149 149
 			}
150 150
 			$path = dirname($path);
151 151
 		}
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 			$idList = array_chunk($ids, 99, true);
156 156
 
157 157
 			foreach ($idList as $subList) {
158
-				$statement = "SELECT `share_with`, `share_type`, `file_target` FROM `*PREFIX*share` WHERE `file_source` IN (" . implode(',', $subList) . ") AND `share_type` IN (0, 1, 2)";
158
+				$statement = "SELECT `share_with`, `share_type`, `file_target` FROM `*PREFIX*share` WHERE `file_source` IN (".implode(',', $subList).") AND `share_type` IN (0, 1, 2)";
159 159
 				$query = \OCP\DB::prepare($statement);
160 160
 				$r = $query->execute();
161 161
 				$result = array_merge($result, $r->fetchAll());
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 			$uid = User::getUser();
184 184
 		}
185 185
 		Filesystem::initMountPoints($uid);
186
-		if ( $uid != User::getUser() ) {
186
+		if ($uid != User::getUser()) {
187 187
 			$info = Filesystem::getFileInfo($filename);
188 188
 			$ownerView = new View('/'.$uid.'/files');
189 189
 			try {
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 		$dir = $pathinfo['dirname'];
231 231
 		$i = 2;
232 232
 		while ($view->file_exists($path) || in_array($path, $excludeList)) {
233
-			$path = Filesystem::normalizePath($dir . '/' . $name . ' ('.$i.')' . $ext);
233
+			$path = Filesystem::normalizePath($dir.'/'.$name.' ('.$i.')'.$ext);
234 234
 			$i++;
235 235
 		}
236 236
 
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 			$dir = '';
255 255
 			$subdirs = explode('/', $shareFolder);
256 256
 			foreach ($subdirs as $subdir) {
257
-				$dir = $dir . '/' . $subdir;
257
+				$dir = $dir.'/'.$subdir;
258 258
 				if (!$view->is_dir($dir)) {
259 259
 					$view->mkdir($dir);
260 260
 				}
Please login to merge, or discard this patch.
apps/files_sharing/lib/DeleteOrphanedSharesJob.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	/**
42 42
 	 * sets the correct interval for this timed job
43 43
 	 */
44
-	public function __construct(){
44
+	public function __construct() {
45 45
 		$this->interval = $this->defaultIntervalMin * 60;
46 46
 	}
47 47
 
@@ -55,8 +55,8 @@  discard block
 block discarded – undo
55 55
 		$logger = \OC::$server->getLogger();
56 56
 
57 57
 		$sql =
58
-			'DELETE FROM `*PREFIX*share` ' .
59
-			'WHERE `item_type` in (\'file\', \'folder\') ' .
58
+			'DELETE FROM `*PREFIX*share` '.
59
+			'WHERE `item_type` in (\'file\', \'folder\') '.
60 60
 			'AND NOT EXISTS (SELECT `fileid` FROM `*PREFIX*filecache` WHERE `file_source` = `fileid`)';
61 61
 
62 62
 		$deletedEntries = $connection->executeUpdate($sql);
Please login to merge, or discard this patch.