@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | return $this->getAppValues($app); |
300 | 300 | } else { |
301 | 301 | $appIds = $this->getApps(); |
302 | - $values = array_map(function ($appId) use ($key) { |
|
302 | + $values = array_map(function($appId) use ($key) { |
|
303 | 303 | return isset($this->cache[$appId][$key]) ? $this->cache[$appId][$key] : null; |
304 | 304 | }, $appIds); |
305 | 305 | $result = array_combine($appIds, $values); |
@@ -348,10 +348,10 @@ discard block |
||
348 | 348 | $rows = $result->fetchAll(); |
349 | 349 | foreach ($rows as $row) { |
350 | 350 | if (!isset($this->cache[$row['appid']])) { |
351 | - $this->cache[(string)$row['appid']] = []; |
|
351 | + $this->cache[(string) $row['appid']] = []; |
|
352 | 352 | } |
353 | 353 | |
354 | - $this->cache[(string)$row['appid']][(string)$row['configkey']] = (string)$row['configvalue']; |
|
354 | + $this->cache[(string) $row['appid']][(string) $row['configkey']] = (string) $row['configvalue']; |
|
355 | 355 | } |
356 | 356 | $result->closeCursor(); |
357 | 357 |
@@ -6,22 +6,22 @@ |
||
6 | 6 | $baseDir = $vendorDir; |
7 | 7 | |
8 | 8 | return array( |
9 | - 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', |
|
10 | - 'OCA\\FederatedFileSharing\\AddressHandler' => $baseDir . '/../lib/AddressHandler.php', |
|
11 | - 'OCA\\FederatedFileSharing\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
12 | - 'OCA\\FederatedFileSharing\\BackgroundJob\\RetryJob' => $baseDir . '/../lib/BackgroundJob/RetryJob.php', |
|
13 | - 'OCA\\FederatedFileSharing\\Controller\\MountPublicLinkController' => $baseDir . '/../lib/Controller/MountPublicLinkController.php', |
|
14 | - 'OCA\\FederatedFileSharing\\Controller\\RequestHandlerController' => $baseDir . '/../lib/Controller/RequestHandlerController.php', |
|
15 | - 'OCA\\FederatedFileSharing\\Events\\FederatedShareAddedEvent' => $baseDir . '/../lib/Events/FederatedShareAddedEvent.php', |
|
16 | - 'OCA\\FederatedFileSharing\\FederatedShareProvider' => $baseDir . '/../lib/FederatedShareProvider.php', |
|
17 | - 'OCA\\FederatedFileSharing\\Listeners\\LoadAdditionalScriptsListener' => $baseDir . '/../lib/Listeners/LoadAdditionalScriptsListener.php', |
|
18 | - 'OCA\\FederatedFileSharing\\Migration\\Version1010Date20200630191755' => $baseDir . '/../lib/Migration/Version1010Date20200630191755.php', |
|
19 | - 'OCA\\FederatedFileSharing\\Migration\\Version1011Date20201120125158' => $baseDir . '/../lib/Migration/Version1011Date20201120125158.php', |
|
20 | - 'OCA\\FederatedFileSharing\\Notifications' => $baseDir . '/../lib/Notifications.php', |
|
21 | - 'OCA\\FederatedFileSharing\\Notifier' => $baseDir . '/../lib/Notifier.php', |
|
22 | - 'OCA\\FederatedFileSharing\\OCM\\CloudFederationProviderFiles' => $baseDir . '/../lib/OCM/CloudFederationProviderFiles.php', |
|
23 | - 'OCA\\FederatedFileSharing\\Settings\\Admin' => $baseDir . '/../lib/Settings/Admin.php', |
|
24 | - 'OCA\\FederatedFileSharing\\Settings\\Personal' => $baseDir . '/../lib/Settings/Personal.php', |
|
25 | - 'OCA\\FederatedFileSharing\\Settings\\PersonalSection' => $baseDir . '/../lib/Settings/PersonalSection.php', |
|
26 | - 'OCA\\FederatedFileSharing\\TokenHandler' => $baseDir . '/../lib/TokenHandler.php', |
|
9 | + 'Composer\\InstalledVersions' => $vendorDir.'/composer/InstalledVersions.php', |
|
10 | + 'OCA\\FederatedFileSharing\\AddressHandler' => $baseDir.'/../lib/AddressHandler.php', |
|
11 | + 'OCA\\FederatedFileSharing\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
12 | + 'OCA\\FederatedFileSharing\\BackgroundJob\\RetryJob' => $baseDir.'/../lib/BackgroundJob/RetryJob.php', |
|
13 | + 'OCA\\FederatedFileSharing\\Controller\\MountPublicLinkController' => $baseDir.'/../lib/Controller/MountPublicLinkController.php', |
|
14 | + 'OCA\\FederatedFileSharing\\Controller\\RequestHandlerController' => $baseDir.'/../lib/Controller/RequestHandlerController.php', |
|
15 | + 'OCA\\FederatedFileSharing\\Events\\FederatedShareAddedEvent' => $baseDir.'/../lib/Events/FederatedShareAddedEvent.php', |
|
16 | + 'OCA\\FederatedFileSharing\\FederatedShareProvider' => $baseDir.'/../lib/FederatedShareProvider.php', |
|
17 | + 'OCA\\FederatedFileSharing\\Listeners\\LoadAdditionalScriptsListener' => $baseDir.'/../lib/Listeners/LoadAdditionalScriptsListener.php', |
|
18 | + 'OCA\\FederatedFileSharing\\Migration\\Version1010Date20200630191755' => $baseDir.'/../lib/Migration/Version1010Date20200630191755.php', |
|
19 | + 'OCA\\FederatedFileSharing\\Migration\\Version1011Date20201120125158' => $baseDir.'/../lib/Migration/Version1011Date20201120125158.php', |
|
20 | + 'OCA\\FederatedFileSharing\\Notifications' => $baseDir.'/../lib/Notifications.php', |
|
21 | + 'OCA\\FederatedFileSharing\\Notifier' => $baseDir.'/../lib/Notifier.php', |
|
22 | + 'OCA\\FederatedFileSharing\\OCM\\CloudFederationProviderFiles' => $baseDir.'/../lib/OCM/CloudFederationProviderFiles.php', |
|
23 | + 'OCA\\FederatedFileSharing\\Settings\\Admin' => $baseDir.'/../lib/Settings/Admin.php', |
|
24 | + 'OCA\\FederatedFileSharing\\Settings\\Personal' => $baseDir.'/../lib/Settings/Personal.php', |
|
25 | + 'OCA\\FederatedFileSharing\\Settings\\PersonalSection' => $baseDir.'/../lib/Settings/PersonalSection.php', |
|
26 | + 'OCA\\FederatedFileSharing\\TokenHandler' => $baseDir.'/../lib/TokenHandler.php', |
|
27 | 27 | ); |
@@ -6,44 +6,44 @@ |
||
6 | 6 | |
7 | 7 | class ComposerStaticInitFederatedFileSharing |
8 | 8 | { |
9 | - public static $prefixLengthsPsr4 = array ( |
|
9 | + public static $prefixLengthsPsr4 = array( |
|
10 | 10 | 'O' => |
11 | - array ( |
|
11 | + array( |
|
12 | 12 | 'OCA\\FederatedFileSharing\\' => 25, |
13 | 13 | ), |
14 | 14 | ); |
15 | 15 | |
16 | - public static $prefixDirsPsr4 = array ( |
|
16 | + public static $prefixDirsPsr4 = array( |
|
17 | 17 | 'OCA\\FederatedFileSharing\\' => |
18 | - array ( |
|
19 | - 0 => __DIR__ . '/..' . '/../lib', |
|
18 | + array( |
|
19 | + 0 => __DIR__.'/..'.'/../lib', |
|
20 | 20 | ), |
21 | 21 | ); |
22 | 22 | |
23 | - public static $classMap = array ( |
|
24 | - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', |
|
25 | - 'OCA\\FederatedFileSharing\\AddressHandler' => __DIR__ . '/..' . '/../lib/AddressHandler.php', |
|
26 | - 'OCA\\FederatedFileSharing\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', |
|
27 | - 'OCA\\FederatedFileSharing\\BackgroundJob\\RetryJob' => __DIR__ . '/..' . '/../lib/BackgroundJob/RetryJob.php', |
|
28 | - 'OCA\\FederatedFileSharing\\Controller\\MountPublicLinkController' => __DIR__ . '/..' . '/../lib/Controller/MountPublicLinkController.php', |
|
29 | - 'OCA\\FederatedFileSharing\\Controller\\RequestHandlerController' => __DIR__ . '/..' . '/../lib/Controller/RequestHandlerController.php', |
|
30 | - 'OCA\\FederatedFileSharing\\Events\\FederatedShareAddedEvent' => __DIR__ . '/..' . '/../lib/Events/FederatedShareAddedEvent.php', |
|
31 | - 'OCA\\FederatedFileSharing\\FederatedShareProvider' => __DIR__ . '/..' . '/../lib/FederatedShareProvider.php', |
|
32 | - 'OCA\\FederatedFileSharing\\Listeners\\LoadAdditionalScriptsListener' => __DIR__ . '/..' . '/../lib/Listeners/LoadAdditionalScriptsListener.php', |
|
33 | - 'OCA\\FederatedFileSharing\\Migration\\Version1010Date20200630191755' => __DIR__ . '/..' . '/../lib/Migration/Version1010Date20200630191755.php', |
|
34 | - 'OCA\\FederatedFileSharing\\Migration\\Version1011Date20201120125158' => __DIR__ . '/..' . '/../lib/Migration/Version1011Date20201120125158.php', |
|
35 | - 'OCA\\FederatedFileSharing\\Notifications' => __DIR__ . '/..' . '/../lib/Notifications.php', |
|
36 | - 'OCA\\FederatedFileSharing\\Notifier' => __DIR__ . '/..' . '/../lib/Notifier.php', |
|
37 | - 'OCA\\FederatedFileSharing\\OCM\\CloudFederationProviderFiles' => __DIR__ . '/..' . '/../lib/OCM/CloudFederationProviderFiles.php', |
|
38 | - 'OCA\\FederatedFileSharing\\Settings\\Admin' => __DIR__ . '/..' . '/../lib/Settings/Admin.php', |
|
39 | - 'OCA\\FederatedFileSharing\\Settings\\Personal' => __DIR__ . '/..' . '/../lib/Settings/Personal.php', |
|
40 | - 'OCA\\FederatedFileSharing\\Settings\\PersonalSection' => __DIR__ . '/..' . '/../lib/Settings/PersonalSection.php', |
|
41 | - 'OCA\\FederatedFileSharing\\TokenHandler' => __DIR__ . '/..' . '/../lib/TokenHandler.php', |
|
23 | + public static $classMap = array( |
|
24 | + 'Composer\\InstalledVersions' => __DIR__.'/..'.'/composer/InstalledVersions.php', |
|
25 | + 'OCA\\FederatedFileSharing\\AddressHandler' => __DIR__.'/..'.'/../lib/AddressHandler.php', |
|
26 | + 'OCA\\FederatedFileSharing\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php', |
|
27 | + 'OCA\\FederatedFileSharing\\BackgroundJob\\RetryJob' => __DIR__.'/..'.'/../lib/BackgroundJob/RetryJob.php', |
|
28 | + 'OCA\\FederatedFileSharing\\Controller\\MountPublicLinkController' => __DIR__.'/..'.'/../lib/Controller/MountPublicLinkController.php', |
|
29 | + 'OCA\\FederatedFileSharing\\Controller\\RequestHandlerController' => __DIR__.'/..'.'/../lib/Controller/RequestHandlerController.php', |
|
30 | + 'OCA\\FederatedFileSharing\\Events\\FederatedShareAddedEvent' => __DIR__.'/..'.'/../lib/Events/FederatedShareAddedEvent.php', |
|
31 | + 'OCA\\FederatedFileSharing\\FederatedShareProvider' => __DIR__.'/..'.'/../lib/FederatedShareProvider.php', |
|
32 | + 'OCA\\FederatedFileSharing\\Listeners\\LoadAdditionalScriptsListener' => __DIR__.'/..'.'/../lib/Listeners/LoadAdditionalScriptsListener.php', |
|
33 | + 'OCA\\FederatedFileSharing\\Migration\\Version1010Date20200630191755' => __DIR__.'/..'.'/../lib/Migration/Version1010Date20200630191755.php', |
|
34 | + 'OCA\\FederatedFileSharing\\Migration\\Version1011Date20201120125158' => __DIR__.'/..'.'/../lib/Migration/Version1011Date20201120125158.php', |
|
35 | + 'OCA\\FederatedFileSharing\\Notifications' => __DIR__.'/..'.'/../lib/Notifications.php', |
|
36 | + 'OCA\\FederatedFileSharing\\Notifier' => __DIR__.'/..'.'/../lib/Notifier.php', |
|
37 | + 'OCA\\FederatedFileSharing\\OCM\\CloudFederationProviderFiles' => __DIR__.'/..'.'/../lib/OCM/CloudFederationProviderFiles.php', |
|
38 | + 'OCA\\FederatedFileSharing\\Settings\\Admin' => __DIR__.'/..'.'/../lib/Settings/Admin.php', |
|
39 | + 'OCA\\FederatedFileSharing\\Settings\\Personal' => __DIR__.'/..'.'/../lib/Settings/Personal.php', |
|
40 | + 'OCA\\FederatedFileSharing\\Settings\\PersonalSection' => __DIR__.'/..'.'/../lib/Settings/PersonalSection.php', |
|
41 | + 'OCA\\FederatedFileSharing\\TokenHandler' => __DIR__.'/..'.'/../lib/TokenHandler.php', |
|
42 | 42 | ); |
43 | 43 | |
44 | 44 | public static function getInitializer(ClassLoader $loader) |
45 | 45 | { |
46 | - return \Closure::bind(function () use ($loader) { |
|
46 | + return \Closure::bind(function() use ($loader) { |
|
47 | 47 | $loader->prefixLengthsPsr4 = ComposerStaticInitFederatedFileSharing::$prefixLengthsPsr4; |
48 | 48 | $loader->prefixDirsPsr4 = ComposerStaticInitFederatedFileSharing::$prefixDirsPsr4; |
49 | 49 | $loader->classMap = ComposerStaticInitFederatedFileSharing::$classMap; |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | ]; |
152 | 152 | |
153 | 153 | $ocmFields = $fields; |
154 | - $ocmFields['remoteId'] = (string)$id; |
|
154 | + $ocmFields['remoteId'] = (string) $id; |
|
155 | 155 | $ocmFields['localId'] = $shareId; |
156 | 156 | $ocmFields['name'] = $filename; |
157 | 157 | |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | return [$ocmResult['token'], $ocmResult['providerId']]; |
161 | 161 | } |
162 | 162 | |
163 | - $result = $this->tryLegacyEndPoint(rtrim($remote, '/'), '/' . $id . '/reshare', $fields); |
|
163 | + $result = $this->tryLegacyEndPoint(rtrim($remote, '/'), '/'.$id.'/reshare', $fields); |
|
164 | 164 | $status = json_decode($result['result'], true); |
165 | 165 | |
166 | 166 | $httpRequestSuccessful = $result['success']; |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | $fields[$key] = $value; |
258 | 258 | } |
259 | 259 | |
260 | - $result = $this->tryHttpPostToShareEndpoint(rtrim($remote, '/'), '/' . $remoteId . '/' . $action, $fields, $action); |
|
260 | + $result = $this->tryHttpPostToShareEndpoint(rtrim($remote, '/'), '/'.$remoteId.'/'.$action, $fields, $action); |
|
261 | 261 | $status = json_decode($result['result'], true); |
262 | 262 | |
263 | 263 | if ($result['success'] && |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | */ |
308 | 308 | protected function tryHttpPostToShareEndpoint($remoteDomain, $urlSuffix, array $fields, $action = "share") { |
309 | 309 | if ($this->addressHandler->urlContainProtocol($remoteDomain) === false) { |
310 | - $remoteDomain = 'https://' . $remoteDomain; |
|
310 | + $remoteDomain = 'https://'.$remoteDomain; |
|
311 | 311 | } |
312 | 312 | |
313 | 313 | $result = [ |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | $federationEndpoints = $this->discoveryService->discover($remoteDomain, 'FEDERATED_SHARING'); |
348 | 348 | $endpoint = isset($federationEndpoints['share']) ? $federationEndpoints['share'] : '/ocs/v2.php/cloud/shares'; |
349 | 349 | try { |
350 | - $response = $client->post($remoteDomain . $endpoint . $urlSuffix . '?format=' . self::RESPONSE_FORMAT, [ |
|
350 | + $response = $client->post($remoteDomain.$endpoint.$urlSuffix.'?format='.self::RESPONSE_FORMAT, [ |
|
351 | 351 | 'body' => $fields, |
352 | 352 | 'timeout' => 10, |
353 | 353 | 'connect_timeout' => 10, |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | switch ($action) { |
380 | 380 | case 'share': |
381 | 381 | $share = $this->cloudFederationFactory->getCloudFederationShare( |
382 | - $fields['shareWith'] . '@' . $remoteDomain, |
|
382 | + $fields['shareWith'].'@'.$remoteDomain, |
|
383 | 383 | $fields['name'], |
384 | 384 | '', |
385 | 385 | $fields['remoteId'], |
@@ -174,7 +174,7 @@ |
||
174 | 174 | |
175 | 175 | $shares = array_merge($groupShares, $roomShares, $deckShares); |
176 | 176 | |
177 | - $shares = array_map(function (IShare $share) { |
|
177 | + $shares = array_map(function(IShare $share) { |
|
178 | 178 | return $this->formatShare($share); |
179 | 179 | }, $shares); |
180 | 180 |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | } |
80 | 80 | |
81 | 81 | // oc_persistent_locks will be removed later on anyways so we can just drop and ignore any foreign key constraints here |
82 | - $tableName = $this->config->getSystemValue('dbtableprefix', 'oc_') . 'persistent_locks'; |
|
82 | + $tableName = $this->config->getSystemValue('dbtableprefix', 'oc_').'persistent_locks'; |
|
83 | 83 | $schema = $this->db->createSchema(); |
84 | 84 | $table = $schema->getTable($tableName); |
85 | 85 | foreach ($table->getForeignKeys() as $foreignKey) { |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | $schema = $this->db->createSchema(); |
102 | 102 | $prefix = $this->config->getSystemValue('dbtableprefix', 'oc_'); |
103 | 103 | |
104 | - $tableName = $prefix . 'accounts'; |
|
104 | + $tableName = $prefix.'accounts'; |
|
105 | 105 | if (!$schema->hasTable($tableName)) { |
106 | 106 | return false; |
107 | 107 | } |
@@ -111,8 +111,8 @@ discard block |
||
111 | 111 | return false; |
112 | 112 | } |
113 | 113 | |
114 | - if ($schema->hasTable($prefix . 'persistent_locks')) { |
|
115 | - $locksTable = $schema->getTable($prefix . 'persistent_locks'); |
|
114 | + if ($schema->hasTable($prefix.'persistent_locks')) { |
|
115 | + $locksTable = $schema->getTable($prefix.'persistent_locks'); |
|
116 | 116 | $foreignKeys = $locksTable->getForeignKeys(); |
117 | 117 | foreach ($foreignKeys as $foreignKey) { |
118 | 118 | if ($tableName === $foreignKey->getForeignTableName()) { |
@@ -64,7 +64,7 @@ |
||
64 | 64 | |
65 | 65 | public function run(IOutput $output) { |
66 | 66 | if (!$this->config->getAppValue('core', 'previewsCleanedUp', false)) { |
67 | - $this->userManager->callForSeenUsers(function (IUser $user) { |
|
67 | + $this->userManager->callForSeenUsers(function(IUser $user) { |
|
68 | 68 | $this->jobList->add(CleanPreviewsBackgroundJob::class, ['uid' => $user->getUID()]); |
69 | 69 | }); |
70 | 70 | $this->config->setAppValue('core', 'previewsCleanedUp', '1'); |
@@ -72,17 +72,17 @@ |
||
72 | 72 | public function run($arguments) { |
73 | 73 | $uid = $arguments['uid']; |
74 | 74 | if (!$this->userManager->userExists($uid)) { |
75 | - $this->logger->info('User no longer exists, skip user ' . $uid); |
|
75 | + $this->logger->info('User no longer exists, skip user '.$uid); |
|
76 | 76 | return; |
77 | 77 | } |
78 | - $this->logger->info('Started preview cleanup for ' . $uid); |
|
78 | + $this->logger->info('Started preview cleanup for '.$uid); |
|
79 | 79 | $empty = $this->cleanupPreviews($uid); |
80 | 80 | |
81 | 81 | if (!$empty) { |
82 | 82 | $this->jobList->add(self::class, ['uid' => $uid]); |
83 | - $this->logger->info('New preview cleanup scheduled for ' . $uid); |
|
83 | + $this->logger->info('New preview cleanup scheduled for '.$uid); |
|
84 | 84 | } else { |
85 | - $this->logger->info('Preview cleanup done for ' . $uid); |
|
85 | + $this->logger->info('Preview cleanup done for '.$uid); |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 |
@@ -84,7 +84,7 @@ |
||
84 | 84 | ->andWhere($qb->expr()->eq('configvalue', $qb->createNamedParameter($oldCode), IQueryBuilder::PARAM_STR)) |
85 | 85 | ->execute(); |
86 | 86 | |
87 | - $output->info('Changed ' . $affectedRows . ' setting(s) from "' . $oldCode . '" to "' . $newCode . '" in preferences table.'); |
|
87 | + $output->info('Changed '.$affectedRows.' setting(s) from "'.$oldCode.'" to "'.$newCode.'" in preferences table.'); |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 | } |