@@ -6,31 +6,31 @@ |
||
6 | 6 | $baseDir = $vendorDir; |
7 | 7 | |
8 | 8 | return array( |
9 | - 'OCA\\Files_Versions\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
10 | - 'OCA\\Files_Versions\\BackgroundJob\\ExpireVersions' => $baseDir . '/../lib/BackgroundJob/ExpireVersions.php', |
|
11 | - 'OCA\\Files_Versions\\Capabilities' => $baseDir . '/../lib/Capabilities.php', |
|
12 | - 'OCA\\Files_Versions\\Command\\CleanUp' => $baseDir . '/../lib/Command/CleanUp.php', |
|
13 | - 'OCA\\Files_Versions\\Command\\Expire' => $baseDir . '/../lib/Command/Expire.php', |
|
14 | - 'OCA\\Files_Versions\\Command\\ExpireVersions' => $baseDir . '/../lib/Command/ExpireVersions.php', |
|
15 | - 'OCA\\Files_Versions\\Controller\\PreviewController' => $baseDir . '/../lib/Controller/PreviewController.php', |
|
16 | - 'OCA\\Files_Versions\\Events\\CreateVersionEvent' => $baseDir . '/../lib/Events/CreateVersionEvent.php', |
|
17 | - 'OCA\\Files_Versions\\Expiration' => $baseDir . '/../lib/Expiration.php', |
|
18 | - 'OCA\\Files_Versions\\Hooks' => $baseDir . '/../lib/Hooks.php', |
|
19 | - 'OCA\\Files_Versions\\Listener\\LoadAdditionalListener' => $baseDir . '/../lib/Listener/LoadAdditionalListener.php', |
|
20 | - 'OCA\\Files_Versions\\Listener\\LoadSidebarListener' => $baseDir . '/../lib/Listener/LoadSidebarListener.php', |
|
21 | - 'OCA\\Files_Versions\\Sabre\\Plugin' => $baseDir . '/../lib/Sabre/Plugin.php', |
|
22 | - 'OCA\\Files_Versions\\Sabre\\RestoreFolder' => $baseDir . '/../lib/Sabre/RestoreFolder.php', |
|
23 | - 'OCA\\Files_Versions\\Sabre\\RootCollection' => $baseDir . '/../lib/Sabre/RootCollection.php', |
|
24 | - 'OCA\\Files_Versions\\Sabre\\VersionCollection' => $baseDir . '/../lib/Sabre/VersionCollection.php', |
|
25 | - 'OCA\\Files_Versions\\Sabre\\VersionFile' => $baseDir . '/../lib/Sabre/VersionFile.php', |
|
26 | - 'OCA\\Files_Versions\\Sabre\\VersionHome' => $baseDir . '/../lib/Sabre/VersionHome.php', |
|
27 | - 'OCA\\Files_Versions\\Sabre\\VersionRoot' => $baseDir . '/../lib/Sabre/VersionRoot.php', |
|
28 | - 'OCA\\Files_Versions\\Storage' => $baseDir . '/../lib/Storage.php', |
|
29 | - 'OCA\\Files_Versions\\Versions\\BackendNotFoundException' => $baseDir . '/../lib/Versions/BackendNotFoundException.php', |
|
30 | - 'OCA\\Files_Versions\\Versions\\IVersion' => $baseDir . '/../lib/Versions/IVersion.php', |
|
31 | - 'OCA\\Files_Versions\\Versions\\IVersionBackend' => $baseDir . '/../lib/Versions/IVersionBackend.php', |
|
32 | - 'OCA\\Files_Versions\\Versions\\IVersionManager' => $baseDir . '/../lib/Versions/IVersionManager.php', |
|
33 | - 'OCA\\Files_Versions\\Versions\\LegacyVersionsBackend' => $baseDir . '/../lib/Versions/LegacyVersionsBackend.php', |
|
34 | - 'OCA\\Files_Versions\\Versions\\Version' => $baseDir . '/../lib/Versions/Version.php', |
|
35 | - 'OCA\\Files_Versions\\Versions\\VersionManager' => $baseDir . '/../lib/Versions/VersionManager.php', |
|
9 | + 'OCA\\Files_Versions\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
10 | + 'OCA\\Files_Versions\\BackgroundJob\\ExpireVersions' => $baseDir.'/../lib/BackgroundJob/ExpireVersions.php', |
|
11 | + 'OCA\\Files_Versions\\Capabilities' => $baseDir.'/../lib/Capabilities.php', |
|
12 | + 'OCA\\Files_Versions\\Command\\CleanUp' => $baseDir.'/../lib/Command/CleanUp.php', |
|
13 | + 'OCA\\Files_Versions\\Command\\Expire' => $baseDir.'/../lib/Command/Expire.php', |
|
14 | + 'OCA\\Files_Versions\\Command\\ExpireVersions' => $baseDir.'/../lib/Command/ExpireVersions.php', |
|
15 | + 'OCA\\Files_Versions\\Controller\\PreviewController' => $baseDir.'/../lib/Controller/PreviewController.php', |
|
16 | + 'OCA\\Files_Versions\\Events\\CreateVersionEvent' => $baseDir.'/../lib/Events/CreateVersionEvent.php', |
|
17 | + 'OCA\\Files_Versions\\Expiration' => $baseDir.'/../lib/Expiration.php', |
|
18 | + 'OCA\\Files_Versions\\Hooks' => $baseDir.'/../lib/Hooks.php', |
|
19 | + 'OCA\\Files_Versions\\Listener\\LoadAdditionalListener' => $baseDir.'/../lib/Listener/LoadAdditionalListener.php', |
|
20 | + 'OCA\\Files_Versions\\Listener\\LoadSidebarListener' => $baseDir.'/../lib/Listener/LoadSidebarListener.php', |
|
21 | + 'OCA\\Files_Versions\\Sabre\\Plugin' => $baseDir.'/../lib/Sabre/Plugin.php', |
|
22 | + 'OCA\\Files_Versions\\Sabre\\RestoreFolder' => $baseDir.'/../lib/Sabre/RestoreFolder.php', |
|
23 | + 'OCA\\Files_Versions\\Sabre\\RootCollection' => $baseDir.'/../lib/Sabre/RootCollection.php', |
|
24 | + 'OCA\\Files_Versions\\Sabre\\VersionCollection' => $baseDir.'/../lib/Sabre/VersionCollection.php', |
|
25 | + 'OCA\\Files_Versions\\Sabre\\VersionFile' => $baseDir.'/../lib/Sabre/VersionFile.php', |
|
26 | + 'OCA\\Files_Versions\\Sabre\\VersionHome' => $baseDir.'/../lib/Sabre/VersionHome.php', |
|
27 | + 'OCA\\Files_Versions\\Sabre\\VersionRoot' => $baseDir.'/../lib/Sabre/VersionRoot.php', |
|
28 | + 'OCA\\Files_Versions\\Storage' => $baseDir.'/../lib/Storage.php', |
|
29 | + 'OCA\\Files_Versions\\Versions\\BackendNotFoundException' => $baseDir.'/../lib/Versions/BackendNotFoundException.php', |
|
30 | + 'OCA\\Files_Versions\\Versions\\IVersion' => $baseDir.'/../lib/Versions/IVersion.php', |
|
31 | + 'OCA\\Files_Versions\\Versions\\IVersionBackend' => $baseDir.'/../lib/Versions/IVersionBackend.php', |
|
32 | + 'OCA\\Files_Versions\\Versions\\IVersionManager' => $baseDir.'/../lib/Versions/IVersionManager.php', |
|
33 | + 'OCA\\Files_Versions\\Versions\\LegacyVersionsBackend' => $baseDir.'/../lib/Versions/LegacyVersionsBackend.php', |
|
34 | + 'OCA\\Files_Versions\\Versions\\Version' => $baseDir.'/../lib/Versions/Version.php', |
|
35 | + 'OCA\\Files_Versions\\Versions\\VersionManager' => $baseDir.'/../lib/Versions/VersionManager.php', |
|
36 | 36 | ); |
@@ -232,7 +232,7 @@ |
||
232 | 232 | |
233 | 233 | $placeholders = $replacements = []; |
234 | 234 | foreach ($subjectParameters as $placeholder => $parameter) { |
235 | - $placeholders[] = '{' . $placeholder . '}'; |
|
235 | + $placeholders[] = '{'.$placeholder.'}'; |
|
236 | 236 | $replacements[] = $parameter['name']; |
237 | 237 | } |
238 | 238 |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | } |
61 | 61 | |
62 | 62 | // Look up the cache - it is invalidated all 30 minutes |
63 | - if (((int)$this->config->getAppValue('core', 'lastupdatedat') + 1800) > time()) { |
|
63 | + if (((int) $this->config->getAppValue('core', 'lastupdatedat') + 1800) > time()) { |
|
64 | 64 | return json_decode($this->config->getAppValue('core', 'lastupdateResult'), true); |
65 | 65 | } |
66 | 66 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $versionString = implode('x', $version); |
85 | 85 | |
86 | 86 | //fetch xml data from updater |
87 | - $url = $updaterUrl . '?version=' . $versionString; |
|
87 | + $url = $updaterUrl.'?version='.$versionString; |
|
88 | 88 | |
89 | 89 | $tmp = []; |
90 | 90 | try { |
@@ -98,13 +98,13 @@ discard block |
||
98 | 98 | $data = @simplexml_load_string($xml); |
99 | 99 | libxml_disable_entity_loader($loadEntities); |
100 | 100 | if ($data !== false) { |
101 | - $tmp['version'] = (string)$data->version; |
|
102 | - $tmp['versionstring'] = (string)$data->versionstring; |
|
103 | - $tmp['url'] = (string)$data->url; |
|
104 | - $tmp['web'] = (string)$data->web; |
|
105 | - $tmp['changes'] = isset($data->changes) ? (string)$data->changes : ''; |
|
106 | - $tmp['autoupdater'] = (string)$data->autoupdater; |
|
107 | - $tmp['eol'] = isset($data->eol) ? (string)$data->eol : '0'; |
|
101 | + $tmp['version'] = (string) $data->version; |
|
102 | + $tmp['versionstring'] = (string) $data->versionstring; |
|
103 | + $tmp['url'] = (string) $data->url; |
|
104 | + $tmp['web'] = (string) $data->web; |
|
105 | + $tmp['changes'] = isset($data->changes) ? (string) $data->changes : ''; |
|
106 | + $tmp['autoupdater'] = (string) $data->autoupdater; |
|
107 | + $tmp['eol'] = isset($data->eol) ? (string) $data->eol : '0'; |
|
108 | 108 | } else { |
109 | 109 | libxml_clear_errors(); |
110 | 110 | } |
@@ -43,6 +43,6 @@ |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | public function getPath() { |
46 | - return $this->getMountPoint() . $this->getInternalPath(); |
|
46 | + return $this->getMountPoint().$this->getInternalPath(); |
|
47 | 47 | } |
48 | 48 | } |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $gid = $input->getArgument('groupid'); |
66 | 66 | $group = $this->groupManager->get($gid); |
67 | 67 | if ($group) { |
68 | - $output->writeln('<error>Group "' . $gid . '" already exists.</error>'); |
|
68 | + $output->writeln('<error>Group "'.$gid.'" already exists.</error>'); |
|
69 | 69 | return 1; |
70 | 70 | } else { |
71 | 71 | $group = $this->groupManager->createGroup($gid); |
@@ -73,9 +73,9 @@ discard block |
||
73 | 73 | $output->writeln('<error>Could not create group</error>'); |
74 | 74 | return 2; |
75 | 75 | } |
76 | - $output->writeln('Created group "' . $group->getGID() . '"'); |
|
76 | + $output->writeln('Created group "'.$group->getGID().'"'); |
|
77 | 77 | |
78 | - $displayName = trim((string)$input->getOption('display-name')); |
|
78 | + $displayName = trim((string) $input->getOption('display-name')); |
|
79 | 79 | if ($displayName !== '') { |
80 | 80 | $group->setDisplayName($displayName); |
81 | 81 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $destinationUserObject = $this->userManager->get($destinationUser); |
99 | 99 | |
100 | 100 | if (!$sourceUserObject instanceof IUser) { |
101 | - $this->logger->alert('Could not transfer ownership: Unknown source user ' . $sourceUser); |
|
101 | + $this->logger->alert('Could not transfer ownership: Unknown source user '.$sourceUser); |
|
102 | 102 | $this->failedNotication($transfer); |
103 | 103 | return; |
104 | 104 | } |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | 'targetUser' => $transfer->getTargetUser(), |
137 | 137 | 'nodeName' => $transfer->getNodeName(), |
138 | 138 | ]) |
139 | - ->setObject('transfer', (string)$transfer->getId()); |
|
139 | + ->setObject('transfer', (string) $transfer->getId()); |
|
140 | 140 | $this->notificationManager->notify($notification); |
141 | 141 | |
142 | 142 | // Send notification to source user |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | 'targetUser' => $transfer->getTargetUser(), |
150 | 150 | 'nodeName' => $transfer->getNodeName(), |
151 | 151 | ]) |
152 | - ->setObject('transfer', (string)$transfer->getId()); |
|
152 | + ->setObject('transfer', (string) $transfer->getId()); |
|
153 | 153 | $this->notificationManager->notify($notification); |
154 | 154 | } |
155 | 155 | |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | 'targetUser' => $transfer->getTargetUser(), |
165 | 165 | 'nodeName' => $transfer->getNodeName(), |
166 | 166 | ]) |
167 | - ->setObject('transfer', (string)$transfer->getId()); |
|
167 | + ->setObject('transfer', (string) $transfer->getId()); |
|
168 | 168 | $this->notificationManager->notify($notification); |
169 | 169 | |
170 | 170 | // Send notification to source user |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | 'targetUser' => $transfer->getTargetUser(), |
178 | 178 | 'nodeName' => $transfer->getNodeName(), |
179 | 179 | ]) |
180 | - ->setObject('transfer', (string)$transfer->getId()); |
|
180 | + ->setObject('transfer', (string) $transfer->getId()); |
|
181 | 181 | $this->notificationManager->notify($notification); |
182 | 182 | } |
183 | 183 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | } |
72 | 72 | } |
73 | 73 | |
74 | - $storageId = (int)$this->storage->getStorageCache()->getNumericId(); |
|
74 | + $storageId = (int) $this->storage->getStorageCache()->getNumericId(); |
|
75 | 75 | |
76 | 76 | $parents = $this->getParents($internalPath); |
77 | 77 | |
@@ -86,12 +86,12 @@ discard block |
||
86 | 86 | $etag = uniqid(); // since we give all folders the same etag we don't ask the storage for the etag |
87 | 87 | |
88 | 88 | $builder = $this->connection->getQueryBuilder(); |
89 | - $hashParams = array_map(function ($hash) use ($builder) { |
|
89 | + $hashParams = array_map(function($hash) use ($builder) { |
|
90 | 90 | return $builder->expr()->literal($hash); |
91 | 91 | }, $parentHashes); |
92 | 92 | |
93 | 93 | $builder->update('filecache') |
94 | - ->set('mtime', $builder->func()->greatest('mtime', $builder->createNamedParameter((int)$time, IQueryBuilder::PARAM_INT))) |
|
94 | + ->set('mtime', $builder->func()->greatest('mtime', $builder->createNamedParameter((int) $time, IQueryBuilder::PARAM_INT))) |
|
95 | 95 | ->set('etag', $builder->createNamedParameter($etag, IQueryBuilder::PARAM_STR)) |
96 | 96 | ->where($builder->expr()->eq('storage', $builder->createNamedParameter($storageId, IQueryBuilder::PARAM_INT))) |
97 | 97 | ->andWhere($builder->expr()->in('path_hash', $hashParams)); |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $parents = []; |
121 | 121 | foreach ($parts as $part) { |
122 | 122 | $parents[] = $parent; |
123 | - $parent = trim($parent . '/' . $part, '/'); |
|
123 | + $parent = trim($parent.'/'.$part, '/'); |
|
124 | 124 | } |
125 | 125 | return $parents; |
126 | 126 | } |
@@ -165,10 +165,10 @@ discard block |
||
165 | 165 | $this->connection->beginTransaction(); |
166 | 166 | |
167 | 167 | $query = $this->connection->getQueryBuilder(); |
168 | - $storageId = (int)$this->storage->getStorageCache()->getNumericId(); |
|
168 | + $storageId = (int) $this->storage->getStorageCache()->getNumericId(); |
|
169 | 169 | |
170 | 170 | $query->update('filecache') |
171 | - ->set('mtime', $query->createFunction('GREATEST(' . $query->getColumnName('mtime') . ', ' . $query->createParameter('time') . ')')) |
|
171 | + ->set('mtime', $query->createFunction('GREATEST('.$query->getColumnName('mtime').', '.$query->createParameter('time').')')) |
|
172 | 172 | ->set('etag', $query->expr()->literal(uniqid())) |
173 | 173 | ->where($query->expr()->eq('storage', $query->expr()->literal($storageId, IQueryBuilder::PARAM_INT))) |
174 | 174 | ->andWhere($query->expr()->eq('path_hash', $query->createParameter('hash'))); |
@@ -28,15 +28,15 @@ |
||
28 | 28 | |
29 | 29 | class SqliteFunctionBuilder extends FunctionBuilder { |
30 | 30 | public function concat($x, $y) { |
31 | - return new QueryFunction('(' . $this->helper->quoteColumnName($x) . ' || ' . $this->helper->quoteColumnName($y) . ')'); |
|
31 | + return new QueryFunction('('.$this->helper->quoteColumnName($x).' || '.$this->helper->quoteColumnName($y).')'); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | public function greatest($x, $y) { |
35 | - return new QueryFunction('MAX(' . $this->helper->quoteColumnName($x) . ', ' . $this->helper->quoteColumnName($y) . ')'); |
|
35 | + return new QueryFunction('MAX('.$this->helper->quoteColumnName($x).', '.$this->helper->quoteColumnName($y).')'); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | public function least($x, $y) { |
39 | - return new QueryFunction('MIN(' . $this->helper->quoteColumnName($x) . ', ' . $this->helper->quoteColumnName($y) . ')'); |
|
39 | + return new QueryFunction('MIN('.$this->helper->quoteColumnName($x).', '.$this->helper->quoteColumnName($y).')'); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | } |
@@ -41,56 +41,56 @@ |
||
41 | 41 | } |
42 | 42 | |
43 | 43 | public function md5($input) { |
44 | - return new QueryFunction('MD5(' . $this->helper->quoteColumnName($input) . ')'); |
|
44 | + return new QueryFunction('MD5('.$this->helper->quoteColumnName($input).')'); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | public function concat($x, $y) { |
48 | - return new QueryFunction('CONCAT(' . $this->helper->quoteColumnName($x) . ', ' . $this->helper->quoteColumnName($y) . ')'); |
|
48 | + return new QueryFunction('CONCAT('.$this->helper->quoteColumnName($x).', '.$this->helper->quoteColumnName($y).')'); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | public function substring($input, $start, $length = null) { |
52 | 52 | if ($length) { |
53 | - return new QueryFunction('SUBSTR(' . $this->helper->quoteColumnName($input) . ', ' . $this->helper->quoteColumnName($start) . ', ' . $this->helper->quoteColumnName($length) . ')'); |
|
53 | + return new QueryFunction('SUBSTR('.$this->helper->quoteColumnName($input).', '.$this->helper->quoteColumnName($start).', '.$this->helper->quoteColumnName($length).')'); |
|
54 | 54 | } else { |
55 | - return new QueryFunction('SUBSTR(' . $this->helper->quoteColumnName($input) . ', ' . $this->helper->quoteColumnName($start) . ')'); |
|
55 | + return new QueryFunction('SUBSTR('.$this->helper->quoteColumnName($input).', '.$this->helper->quoteColumnName($start).')'); |
|
56 | 56 | } |
57 | 57 | } |
58 | 58 | |
59 | 59 | public function sum($field) { |
60 | - return new QueryFunction('SUM(' . $this->helper->quoteColumnName($field) . ')'); |
|
60 | + return new QueryFunction('SUM('.$this->helper->quoteColumnName($field).')'); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | public function lower($field) { |
64 | - return new QueryFunction('LOWER(' . $this->helper->quoteColumnName($field) . ')'); |
|
64 | + return new QueryFunction('LOWER('.$this->helper->quoteColumnName($field).')'); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | public function add($x, $y) { |
68 | - return new QueryFunction($this->helper->quoteColumnName($x) . ' + ' . $this->helper->quoteColumnName($y)); |
|
68 | + return new QueryFunction($this->helper->quoteColumnName($x).' + '.$this->helper->quoteColumnName($y)); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | public function subtract($x, $y) { |
72 | - return new QueryFunction($this->helper->quoteColumnName($x) . ' - ' . $this->helper->quoteColumnName($y)); |
|
72 | + return new QueryFunction($this->helper->quoteColumnName($x).' - '.$this->helper->quoteColumnName($y)); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | public function count($count = '', $alias = '') { |
76 | - $alias = $alias ? (' AS ' . $this->helper->quoteColumnName($alias)) : ''; |
|
76 | + $alias = $alias ? (' AS '.$this->helper->quoteColumnName($alias)) : ''; |
|
77 | 77 | $quotedName = $count === '' ? '*' : $this->helper->quoteColumnName($count); |
78 | - return new QueryFunction('COUNT(' . $quotedName . ')' . $alias); |
|
78 | + return new QueryFunction('COUNT('.$quotedName.')'.$alias); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | public function max($field) { |
82 | - return new QueryFunction('MAX(' . $this->helper->quoteColumnName($field) . ')'); |
|
82 | + return new QueryFunction('MAX('.$this->helper->quoteColumnName($field).')'); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | public function min($field) { |
86 | - return new QueryFunction('MIN(' . $this->helper->quoteColumnName($field) . ')'); |
|
86 | + return new QueryFunction('MIN('.$this->helper->quoteColumnName($field).')'); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | public function greatest($x, $y) { |
90 | - return new QueryFunction('GREATEST(' . $this->helper->quoteColumnName($x) . ', ' . $this->helper->quoteColumnName($y) . ')'); |
|
90 | + return new QueryFunction('GREATEST('.$this->helper->quoteColumnName($x).', '.$this->helper->quoteColumnName($y).')'); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | public function least($x, $y) { |
94 | - return new QueryFunction('LEAST(' . $this->helper->quoteColumnName($x) . ', ' . $this->helper->quoteColumnName($y) . ')'); |
|
94 | + return new QueryFunction('LEAST('.$this->helper->quoteColumnName($x).', '.$this->helper->quoteColumnName($y).')'); |
|
95 | 95 | } |
96 | 96 | } |