@@ -8,16 +8,16 @@ discard block |
||
8 | 8 | <fieldset id="ldapWizard1"> |
9 | 9 | <p> |
10 | 10 | <select id="ldap_serverconfig_chooser" name="ldap_serverconfig_chooser"> |
11 | - <?php if(count($_['serverConfigurationPrefixes']) === 0 ) { |
|
11 | + <?php if (count($_['serverConfigurationPrefixes']) === 0) { |
|
12 | 12 | ?> |
13 | - <option value="" selected><?php p($l->t('1. Server'));?></option>'); |
|
13 | + <option value="" selected><?php p($l->t('1. Server')); ?></option>'); |
|
14 | 14 | <?php |
15 | 15 | } else { |
16 | 16 | $i = 1; |
17 | 17 | $sel = ' selected'; |
18 | - foreach($_['serverConfigurationPrefixes'] as $prefix) { |
|
18 | + foreach ($_['serverConfigurationPrefixes'] as $prefix) { |
|
19 | 19 | ?> |
20 | - <option value="<?php p($prefix); ?>"<?php p($sel); $sel = ''; ?>><?php p($l->t('%s. Server:', array($i++)));?> <?php p(' '.$_['serverConfigurationHosts'][$prefix]); ?></option> |
|
20 | + <option value="<?php p($prefix); ?>"<?php p($sel); $sel = ''; ?>><?php p($l->t('%s. Server:', array($i++))); ?> <?php p(' '.$_['serverConfigurationHosts'][$prefix]); ?></option> |
|
21 | 21 | <?php |
22 | 22 | } |
23 | 23 | } |
@@ -25,14 +25,14 @@ discard block |
||
25 | 25 | </select> |
26 | 26 | <button type="button" id="ldap_action_add_configuration" |
27 | 27 | name="ldap_action_add_configuration" class="icon-add icon-default-style" |
28 | - title="<?php p($l->t('Add a new configuration'));?>"> </button> |
|
28 | + title="<?php p($l->t('Add a new configuration')); ?>"> </button> |
|
29 | 29 | <button type="button" id="ldap_action_copy_configuration" |
30 | 30 | name="ldap_action_copy_configuration" |
31 | 31 | class="ldapIconCopy icon-default-style" |
32 | - title="<?php p($l->t('Copy current configuration into new directory binding'));?>"> </button> |
|
32 | + title="<?php p($l->t('Copy current configuration into new directory binding')); ?>"> </button> |
|
33 | 33 | <button type="button" id="ldap_action_delete_configuration" |
34 | 34 | name="ldap_action_delete_configuration" class="icon-delete icon-default-style" |
35 | - title="<?php p($l->t('Delete the current configuration'));?>"> </button> |
|
35 | + title="<?php p($l->t('Delete the current configuration')); ?>"> </button> |
|
36 | 36 | </p> |
37 | 37 | |
38 | 38 | <div class="hostPortCombinator"> |
@@ -41,14 +41,14 @@ discard block |
||
41 | 41 | <div class="table"> |
42 | 42 | <input type="text" class="host" id="ldap_host" |
43 | 43 | name="ldap_host" |
44 | - placeholder="<?php p($l->t('Host'));?>" |
|
45 | - title="<?php p($l->t('You can omit the protocol, unless you require SSL. If so, start with ldaps://'));?>" |
|
44 | + placeholder="<?php p($l->t('Host')); ?>" |
|
45 | + title="<?php p($l->t('You can omit the protocol, unless you require SSL. If so, start with ldaps://')); ?>" |
|
46 | 46 | /> |
47 | 47 | <span class="hostPortCombinatorSpan"> |
48 | 48 | <input type="number" id="ldap_port" name="ldap_port" |
49 | - placeholder="<?php p($l->t('Port'));?>" /> |
|
49 | + placeholder="<?php p($l->t('Port')); ?>" /> |
|
50 | 50 | <button class="ldapDetectPort" name="ldapDetectPort" type="button"> |
51 | - <?php p($l->t('Detect Port'));?> |
|
51 | + <?php p($l->t('Detect Port')); ?> |
|
52 | 52 | </button> |
53 | 53 | </span> |
54 | 54 | </div> |
@@ -57,40 +57,40 @@ discard block |
||
57 | 57 | <div class="tablerow"> |
58 | 58 | <input type="text" id="ldap_dn" name="ldap_dn" |
59 | 59 | class="tablecell" |
60 | - placeholder="<?php p($l->t('User DN'));?>" autocomplete="off" |
|
61 | - title="<?php p($l->t('The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty.'));?>" |
|
60 | + placeholder="<?php p($l->t('User DN')); ?>" autocomplete="off" |
|
61 | + title="<?php p($l->t('The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty.')); ?>" |
|
62 | 62 | /> |
63 | 63 | </div> |
64 | 64 | |
65 | 65 | <div class="tablerow"> |
66 | 66 | <input type="password" id="ldap_agent_password" |
67 | 67 | class="tablecell" name="ldap_agent_password" |
68 | - placeholder="<?php p($l->t('Password'));?>" autocomplete="off" |
|
69 | - title="<?php p($l->t('For anonymous access, leave DN and Password empty.'));?>" |
|
68 | + placeholder="<?php p($l->t('Password')); ?>" autocomplete="off" |
|
69 | + title="<?php p($l->t('For anonymous access, leave DN and Password empty.')); ?>" |
|
70 | 70 | /> |
71 | 71 | </div> |
72 | 72 | |
73 | 73 | <div class="tablerow"> |
74 | 74 | <textarea id="ldap_base" name="ldap_base" |
75 | 75 | class="tablecell" |
76 | - placeholder="<?php p($l->t('One Base DN per line'));?>" |
|
77 | - title="<?php p($l->t('You can specify Base DN for users and groups in the Advanced tab'));?>"> |
|
76 | + placeholder="<?php p($l->t('One Base DN per line')); ?>" |
|
77 | + title="<?php p($l->t('You can specify Base DN for users and groups in the Advanced tab')); ?>"> |
|
78 | 78 | </textarea> |
79 | 79 | <button class="ldapDetectBase" name="ldapDetectBase" type="button"> |
80 | - <?php p($l->t('Detect Base DN'));?> |
|
80 | + <?php p($l->t('Detect Base DN')); ?> |
|
81 | 81 | </button> |
82 | 82 | <button class="ldapTestBase" name="ldapTestBase" type="button"> |
83 | - <?php p($l->t('Test Base DN'));?> |
|
83 | + <?php p($l->t('Test Base DN')); ?> |
|
84 | 84 | </button> |
85 | 85 | </div> |
86 | 86 | |
87 | 87 | <div class="tablerow left"> |
88 | 88 | <input type="checkbox" id="ldap_experienced_admin" value="1" |
89 | 89 | name="ldap_experienced_admin" class="tablecell" |
90 | - title="<?php p($l->t('Avoids automatic LDAP requests. Better for bigger setups, but requires some LDAP knowledge.'));?>" |
|
90 | + title="<?php p($l->t('Avoids automatic LDAP requests. Better for bigger setups, but requires some LDAP knowledge.')); ?>" |
|
91 | 91 | /> |
92 | 92 | <label for="ldap_experienced_admin" class="tablecell"> |
93 | - <?php p($l->t('Manually enter LDAP filters (recommended for large directories)'));?> |
|
93 | + <?php p($l->t('Manually enter LDAP filters (recommended for large directories)')); ?> |
|
94 | 94 | </label> |
95 | 95 | </div> |
96 | 96 |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | } catch (NotFoundException $e) { |
123 | 123 | return new DataResponse( |
124 | 124 | [ |
125 | - 'message' => (string)$this->l10n->t('Storage with ID "%d" not found', array($id)) |
|
125 | + 'message' => (string) $this->l10n->t('Storage with ID "%d" not found', array($id)) |
|
126 | 126 | ], |
127 | 127 | Http::STATUS_NOT_FOUND |
128 | 128 | ); |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | } else { |
163 | 163 | return new DataResponse( |
164 | 164 | [ |
165 | - 'message' => (string)$this->l10n->t('Storage with ID "%d" is not user editable', array($id)) |
|
165 | + 'message' => (string) $this->l10n->t('Storage with ID "%d" is not user editable', array($id)) |
|
166 | 166 | ], |
167 | 167 | Http::STATUS_FORBIDDEN |
168 | 168 | ); |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | } catch (NotFoundException $e) { |
171 | 171 | return new DataResponse( |
172 | 172 | [ |
173 | - 'message' => (string)$this->l10n->t('Storage with ID "%d" not found', array($id)) |
|
173 | + 'message' => (string) $this->l10n->t('Storage with ID "%d" not found', array($id)) |
|
174 | 174 | ], |
175 | 175 | Http::STATUS_NOT_FOUND |
176 | 176 | ); |
@@ -198,7 +198,7 @@ |
||
198 | 198 | } catch (NotFoundException $e) { |
199 | 199 | return new DataResponse( |
200 | 200 | [ |
201 | - 'message' => (string)$this->l10n->t('Storage with ID "%d" not found', array($id)) |
|
201 | + 'message' => (string) $this->l10n->t('Storage with ID "%d" not found', array($id)) |
|
202 | 202 | ], |
203 | 203 | Http::STATUS_NOT_FOUND |
204 | 204 | ); |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | $path = basename($fullPath); |
106 | 106 | |
107 | 107 | if ($normalizedPath !== $path) { |
108 | - $output->writeln("\t<error>Entry \"" . $fullPath . '" will not be accessible due to incompatible encoding</error>'); |
|
108 | + $output->writeln("\t<error>Entry \"".$fullPath.'" will not be accessible due to incompatible encoding</error>'); |
|
109 | 109 | } |
110 | 110 | } |
111 | 111 | |
@@ -115,42 +115,42 @@ discard block |
||
115 | 115 | # check on each file/folder if there was a user interrupt (ctrl-c) and throw an exception |
116 | 116 | # printout and count |
117 | 117 | if ($verbose) { |
118 | - $scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function ($path) use ($output) { |
|
118 | + $scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function($path) use ($output) { |
|
119 | 119 | $output->writeln("\tFile <info>$path</info>"); |
120 | 120 | $this->filesCounter += 1; |
121 | 121 | if ($this->hasBeenInterrupted()) { |
122 | 122 | throw new InterruptedException(); |
123 | 123 | } |
124 | 124 | }); |
125 | - $scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function ($path) use ($output) { |
|
125 | + $scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function($path) use ($output) { |
|
126 | 126 | $output->writeln("\tFolder <info>$path</info>"); |
127 | 127 | $this->foldersCounter += 1; |
128 | 128 | if ($this->hasBeenInterrupted()) { |
129 | 129 | throw new InterruptedException(); |
130 | 130 | } |
131 | 131 | }); |
132 | - $scanner->listen('\OC\Files\Utils\Scanner', 'StorageNotAvailable', function (StorageNotAvailableException $e) use ($output) { |
|
133 | - $output->writeln("Error while scanning, storage not available (" . $e->getMessage() . ")"); |
|
132 | + $scanner->listen('\OC\Files\Utils\Scanner', 'StorageNotAvailable', function(StorageNotAvailableException $e) use ($output) { |
|
133 | + $output->writeln("Error while scanning, storage not available (".$e->getMessage().")"); |
|
134 | 134 | }); |
135 | 135 | # count only |
136 | 136 | } else { |
137 | - $scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function () use ($output) { |
|
137 | + $scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function() use ($output) { |
|
138 | 138 | $this->filesCounter += 1; |
139 | 139 | if ($this->hasBeenInterrupted()) { |
140 | 140 | throw new InterruptedException(); |
141 | 141 | } |
142 | 142 | }); |
143 | - $scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function () use ($output) { |
|
143 | + $scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function() use ($output) { |
|
144 | 144 | $this->foldersCounter += 1; |
145 | 145 | if ($this->hasBeenInterrupted()) { |
146 | 146 | throw new InterruptedException(); |
147 | 147 | } |
148 | 148 | }); |
149 | 149 | } |
150 | - $scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function ($path) use ($output) { |
|
150 | + $scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function($path) use ($output) { |
|
151 | 151 | $this->checkScanWarning($path, $output); |
152 | 152 | }); |
153 | - $scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function ($path) use ($output) { |
|
153 | + $scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function($path) use ($output) { |
|
154 | 154 | $this->checkScanWarning($path, $output); |
155 | 155 | }); |
156 | 156 | |
@@ -167,10 +167,10 @@ discard block |
||
167 | 167 | # exit the function if ctrl-c has been pressed |
168 | 168 | $output->writeln('Interrupted by user'); |
169 | 169 | } catch (NotFoundException $e) { |
170 | - $output->writeln('<error>Path not found: ' . $e->getMessage() . '</error>'); |
|
170 | + $output->writeln('<error>Path not found: '.$e->getMessage().'</error>'); |
|
171 | 171 | } catch (\Exception $e) { |
172 | - $output->writeln('<error>Exception during scan: ' . $e->getMessage() . '</error>'); |
|
173 | - $output->writeln('<error>' . $e->getTraceAsString() . '</error>'); |
|
172 | + $output->writeln('<error>Exception during scan: '.$e->getMessage().'</error>'); |
|
173 | + $output->writeln('<error>'.$e->getTraceAsString().'</error>'); |
|
174 | 174 | } |
175 | 175 | } |
176 | 176 | |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | protected function execute(InputInterface $input, OutputInterface $output) { |
179 | 179 | $inputPath = $input->getOption('path'); |
180 | 180 | if ($inputPath) { |
181 | - $inputPath = '/' . trim($inputPath, '/'); |
|
181 | + $inputPath = '/'.trim($inputPath, '/'); |
|
182 | 182 | list (, $user,) = explode('/', $inputPath, 3); |
183 | 183 | $users = array($user); |
184 | 184 | } else if ($input->getOption('all')) { |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | if (is_object($user)) { |
223 | 223 | $user = $user->getUID(); |
224 | 224 | } |
225 | - $path = $inputPath ? $inputPath : '/' . $user; |
|
225 | + $path = $inputPath ? $inputPath : '/'.$user; |
|
226 | 226 | $user_count += 1; |
227 | 227 | if ($this->userManager->userExists($user)) { |
228 | 228 | # add an extra line when verbose is set to optical separate users |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | $path = basename($fullPath); |
65 | 65 | |
66 | 66 | if ($normalizedPath !== $path) { |
67 | - $output->writeln("\t<error>Entry \"" . $fullPath . '" will not be accessible due to incompatible encoding</error>'); |
|
67 | + $output->writeln("\t<error>Entry \"".$fullPath.'" will not be accessible due to incompatible encoding</error>'); |
|
68 | 68 | } |
69 | 69 | } |
70 | 70 | |
@@ -81,32 +81,32 @@ discard block |
||
81 | 81 | # check on each file/folder if there was a user interrupt (ctrl-c) and throw an exception |
82 | 82 | # printout and count |
83 | 83 | if ($verbose) { |
84 | - $scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function ($path) use ($output) { |
|
84 | + $scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function($path) use ($output) { |
|
85 | 85 | $output->writeln("\tFile <info>$path</info>"); |
86 | 86 | $this->filesCounter += 1; |
87 | 87 | if ($this->hasBeenInterrupted()) { |
88 | 88 | throw new InterruptedException(); |
89 | 89 | } |
90 | 90 | }); |
91 | - $scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function ($path) use ($output) { |
|
91 | + $scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function($path) use ($output) { |
|
92 | 92 | $output->writeln("\tFolder <info>$path</info>"); |
93 | 93 | $this->foldersCounter += 1; |
94 | 94 | if ($this->hasBeenInterrupted()) { |
95 | 95 | throw new InterruptedException(); |
96 | 96 | } |
97 | 97 | }); |
98 | - $scanner->listen('\OC\Files\Utils\Scanner', 'StorageNotAvailable', function (StorageNotAvailableException $e) use ($output) { |
|
99 | - $output->writeln("Error while scanning, storage not available (" . $e->getMessage() . ")"); |
|
98 | + $scanner->listen('\OC\Files\Utils\Scanner', 'StorageNotAvailable', function(StorageNotAvailableException $e) use ($output) { |
|
99 | + $output->writeln("Error while scanning, storage not available (".$e->getMessage().")"); |
|
100 | 100 | }); |
101 | 101 | # count only |
102 | 102 | } else { |
103 | - $scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function () use ($output) { |
|
103 | + $scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function() use ($output) { |
|
104 | 104 | $this->filesCounter += 1; |
105 | 105 | if ($this->hasBeenInterrupted()) { |
106 | 106 | throw new InterruptedException(); |
107 | 107 | } |
108 | 108 | }); |
109 | - $scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function () use ($output) { |
|
109 | + $scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', function() use ($output) { |
|
110 | 110 | $this->foldersCounter += 1; |
111 | 111 | if ($this->hasBeenInterrupted()) { |
112 | 112 | throw new InterruptedException(); |
@@ -129,10 +129,10 @@ discard block |
||
129 | 129 | # exit the function if ctrl-c has been pressed |
130 | 130 | $output->writeln('Interrupted by user'); |
131 | 131 | } catch (NotFoundException $e) { |
132 | - $output->writeln('<error>Path not found: ' . $e->getMessage() . '</error>'); |
|
132 | + $output->writeln('<error>Path not found: '.$e->getMessage().'</error>'); |
|
133 | 133 | } catch (\Exception $e) { |
134 | - $output->writeln('<error>Exception during scan: ' . $e->getMessage() . '</error>'); |
|
135 | - $output->writeln('<error>' . $e->getTraceAsString() . '</error>'); |
|
134 | + $output->writeln('<error>Exception during scan: '.$e->getMessage().'</error>'); |
|
135 | + $output->writeln('<error>'.$e->getTraceAsString().'</error>'); |
|
136 | 136 | } |
137 | 137 | } |
138 | 138 |
@@ -150,7 +150,7 @@ |
||
150 | 150 | */ |
151 | 151 | public function mapperEvent(MapperEvent $event) { |
152 | 152 | $tagIds = $event->getTags(); |
153 | - if ($event->getObjectType() !== 'files' ||empty($tagIds) |
|
153 | + if ($event->getObjectType() !== 'files' || empty($tagIds) |
|
154 | 154 | || !in_array($event->getEvent(), [MapperEvent::EVENT_ASSIGN, MapperEvent::EVENT_UNASSIGN]) |
155 | 155 | || !$this->appManager->isInstalled('activity')) { |
156 | 156 | // System tags not for files, no tags, not (un-)assigning or no activity-app enabled (save the energy) |
@@ -47,13 +47,13 @@ discard block |
||
47 | 47 | throw new \Exception("Access Key, Secret and Bucket have to be configured."); |
48 | 48 | } |
49 | 49 | |
50 | - $this->id = 'amazon::' . $params['bucket']; |
|
50 | + $this->id = 'amazon::'.$params['bucket']; |
|
51 | 51 | |
52 | 52 | $this->test = isset($params['test']); |
53 | 53 | $this->bucket = $params['bucket']; |
54 | 54 | $this->timeout = (!isset($params['timeout'])) ? 15 : $params['timeout']; |
55 | 55 | $params['region'] = empty($params['region']) ? 'eu-west-1' : $params['region']; |
56 | - $params['hostname'] = empty($params['hostname']) ? 's3.' . $params['region'] . '.amazonaws.com' : $params['hostname']; |
|
56 | + $params['hostname'] = empty($params['hostname']) ? 's3.'.$params['region'].'.amazonaws.com' : $params['hostname']; |
|
57 | 57 | if (!isset($params['port']) || $params['port'] === '') { |
58 | 58 | $params['port'] = (isset($params['use_ssl']) && $params['use_ssl'] === false) ? 80 : 443; |
59 | 59 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | $scheme = (isset($this->params['use_ssl']) && $this->params['use_ssl'] === false) ? 'http' : 'https'; |
76 | - $base_url = $scheme . '://' . $this->params['hostname'] . ':' . $this->params['port'] . '/'; |
|
76 | + $base_url = $scheme.'://'.$this->params['hostname'].':'.$this->params['port'].'/'; |
|
77 | 77 | |
78 | 78 | $options = [ |
79 | 79 | 'version' => isset($this->params['version']) ? $this->params['version'] : 'latest', |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | $this->testTimeout(); |
105 | 105 | } catch (S3Exception $e) { |
106 | 106 | \OCP\Util::logException('files_external', $e); |
107 | - throw new \Exception('Creation of bucket failed. ' . $e->getMessage()); |
|
107 | + throw new \Exception('Creation of bucket failed. '.$e->getMessage()); |
|
108 | 108 | } |
109 | 109 | } |
110 | 110 |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | if (!$this->isValidPath($path)) { |
56 | 56 | throw new NotPermittedException('Invalid path'); |
57 | 57 | } |
58 | - return $this->path . $this->normalizePath($path); |
|
58 | + return $this->path.$this->normalizePath($path); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | } |
69 | 69 | if ($path === $this->path) { |
70 | 70 | return '/'; |
71 | - } else if (strpos($path, $this->path . '/') !== 0) { |
|
71 | + } else if (strpos($path, $this->path.'/') !== 0) { |
|
72 | 72 | return null; |
73 | 73 | } else { |
74 | 74 | $path = substr($path, strlen($this->path)); |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | * @return bool |
84 | 84 | */ |
85 | 85 | public function isSubNode($node) { |
86 | - return strpos($node->getPath(), $this->path . '/') === 0; |
|
86 | + return strpos($node->getPath(), $this->path.'/') === 0; |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | public function getDirectoryListing() { |
96 | 96 | $folderContent = $this->view->getDirectoryContent($this->path); |
97 | 97 | |
98 | - return array_map(function (FileInfo $info) { |
|
98 | + return array_map(function(FileInfo $info) { |
|
99 | 99 | if ($info->getMimetype() === 'httpd/unix-directory') { |
100 | 100 | return new Folder($this->root, $this->view, $info->getPath(), $info); |
101 | 101 | } else { |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | */ |
197 | 197 | public function search($query) { |
198 | 198 | if (is_string($query)) { |
199 | - return $this->searchCommon('search', array('%' . $query . '%')); |
|
199 | + return $this->searchCommon('search', array('%'.$query.'%')); |
|
200 | 200 | } else { |
201 | 201 | return $this->searchCommon('searchQuery', array($query)); |
202 | 202 | } |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | $internalPath = $mount->getInternalPath($this->path); |
237 | 237 | $internalPath = rtrim($internalPath, '/'); |
238 | 238 | if ($internalPath !== '') { |
239 | - $internalPath = $internalPath . '/'; |
|
239 | + $internalPath = $internalPath.'/'; |
|
240 | 240 | } |
241 | 241 | $internalRootLength = strlen($internalPath); |
242 | 242 | |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | $result['internalPath'] = $result['path']; |
249 | 249 | $result['path'] = substr($result['path'], $internalRootLength); |
250 | 250 | $result['storage'] = $storage; |
251 | - $files[] = new \OC\Files\FileInfo($this->path . '/' . $result['path'], $storage, $result['internalPath'], $result, $mount); |
|
251 | + $files[] = new \OC\Files\FileInfo($this->path.'/'.$result['path'], $storage, $result['internalPath'], $result, $mount); |
|
252 | 252 | } |
253 | 253 | } |
254 | 254 | |
@@ -262,14 +262,14 @@ discard block |
||
262 | 262 | $results = call_user_func_array(array($cache, $method), $args); |
263 | 263 | foreach ($results as $result) { |
264 | 264 | $result['internalPath'] = $result['path']; |
265 | - $result['path'] = $relativeMountPoint . $result['path']; |
|
265 | + $result['path'] = $relativeMountPoint.$result['path']; |
|
266 | 266 | $result['storage'] = $storage; |
267 | - $files[] = new \OC\Files\FileInfo($this->path . '/' . $result['path'], $storage, $result['internalPath'], $result, $mount); |
|
267 | + $files[] = new \OC\Files\FileInfo($this->path.'/'.$result['path'], $storage, $result['internalPath'], $result, $mount); |
|
268 | 268 | } |
269 | 269 | } |
270 | 270 | } |
271 | 271 | |
272 | - return array_map(function (FileInfo $file) { |
|
272 | + return array_map(function(FileInfo $file) { |
|
273 | 273 | return $this->createNode($file->getPath(), $file); |
274 | 274 | }, $files); |
275 | 275 | } |
@@ -285,16 +285,16 @@ discard block |
||
285 | 285 | } else { |
286 | 286 | $user = null; |
287 | 287 | } |
288 | - $mountsContainingFile = $mountCache->getMountsForFileId((int)$id, $user); |
|
288 | + $mountsContainingFile = $mountCache->getMountsForFileId((int) $id, $user); |
|
289 | 289 | $mounts = $this->root->getMountsIn($this->path); |
290 | 290 | $mounts[] = $this->root->getMount($this->path); |
291 | 291 | /** @var IMountPoint[] $folderMounts */ |
292 | - $folderMounts = array_combine(array_map(function (IMountPoint $mountPoint) { |
|
292 | + $folderMounts = array_combine(array_map(function(IMountPoint $mountPoint) { |
|
293 | 293 | return $mountPoint->getMountPoint(); |
294 | 294 | }, $mounts), $mounts); |
295 | 295 | |
296 | 296 | /** @var ICachedMountInfo[] $mountsContainingFile */ |
297 | - $mountsContainingFile = array_values(array_filter($mountsContainingFile, function (ICachedMountInfo $cachedMountInfo) use ($folderMounts) { |
|
297 | + $mountsContainingFile = array_values(array_filter($mountsContainingFile, function(ICachedMountInfo $cachedMountInfo) use ($folderMounts) { |
|
298 | 298 | return isset($folderMounts[$cachedMountInfo->getMountPoint()]); |
299 | 299 | })); |
300 | 300 | |
@@ -305,25 +305,25 @@ discard block |
||
305 | 305 | // we only need to get the cache info once, since all mounts we found point to the same storage |
306 | 306 | |
307 | 307 | $mount = $folderMounts[$mountsContainingFile[0]->getMountPoint()]; |
308 | - $cacheEntry = $mount->getStorage()->getCache()->get((int)$id); |
|
308 | + $cacheEntry = $mount->getStorage()->getCache()->get((int) $id); |
|
309 | 309 | if (!$cacheEntry) { |
310 | 310 | return []; |
311 | 311 | } |
312 | 312 | // cache jails will hide the "true" internal path |
313 | - $internalPath = ltrim($mountsContainingFile[0]->getRootInternalPath() . '/' . $cacheEntry->getPath(), '/'); |
|
313 | + $internalPath = ltrim($mountsContainingFile[0]->getRootInternalPath().'/'.$cacheEntry->getPath(), '/'); |
|
314 | 314 | |
315 | - $nodes = array_map(function (ICachedMountInfo $cachedMountInfo) use ($cacheEntry, $folderMounts, $internalPath) { |
|
315 | + $nodes = array_map(function(ICachedMountInfo $cachedMountInfo) use ($cacheEntry, $folderMounts, $internalPath) { |
|
316 | 316 | $mount = $folderMounts[$cachedMountInfo->getMountPoint()]; |
317 | 317 | $pathRelativeToMount = substr($internalPath, strlen($cachedMountInfo->getRootInternalPath())); |
318 | 318 | $pathRelativeToMount = ltrim($pathRelativeToMount, '/'); |
319 | - $absolutePath = $cachedMountInfo->getMountPoint() . $pathRelativeToMount; |
|
319 | + $absolutePath = $cachedMountInfo->getMountPoint().$pathRelativeToMount; |
|
320 | 320 | return $this->root->createNode($absolutePath, new \OC\Files\FileInfo( |
321 | 321 | $absolutePath, $mount->getStorage(), $cacheEntry->getPath(), $cacheEntry, $mount, |
322 | 322 | \OC::$server->getUserManager()->get($mount->getStorage()->getOwner($pathRelativeToMount)) |
323 | 323 | )); |
324 | 324 | }, $mountsContainingFile); |
325 | 325 | |
326 | - return array_filter($nodes, function (Node $node) { |
|
326 | + return array_filter($nodes, function(Node $node) { |
|
327 | 327 | return $this->getRelativePath($node->getPath()); |
328 | 328 | }); |
329 | 329 | } |
@@ -367,10 +367,10 @@ discard block |
||
367 | 367 | $mounts = $this->root->getMountsIn($this->path); |
368 | 368 | $mounts[] = $this->getMountPoint(); |
369 | 369 | |
370 | - $mounts = array_filter($mounts, function (IMountPoint $mount) { |
|
370 | + $mounts = array_filter($mounts, function(IMountPoint $mount) { |
|
371 | 371 | return $mount->getStorage(); |
372 | 372 | }); |
373 | - $storageIds = array_map(function (IMountPoint $mount) { |
|
373 | + $storageIds = array_map(function(IMountPoint $mount) { |
|
374 | 374 | return $mount->getStorage()->getCache()->getNumericStorageId(); |
375 | 375 | }, $mounts); |
376 | 376 | /** @var IMountPoint[] $mountMap */ |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | |
396 | 396 | $result = $query->execute()->fetchAll(); |
397 | 397 | |
398 | - $files = array_filter(array_map(function (array $entry) use ($mountMap, $mimetypeLoader) { |
|
398 | + $files = array_filter(array_map(function(array $entry) use ($mountMap, $mimetypeLoader) { |
|
399 | 399 | $mount = $mountMap[$entry['storage']]; |
400 | 400 | $entry['internalPath'] = $entry['path']; |
401 | 401 | $entry['mimetype'] = $mimetypeLoader->getMimetypeById($entry['mimetype']); |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | return $this->root->createNode($fileInfo->getPath(), $fileInfo); |
409 | 409 | }, $result)); |
410 | 410 | |
411 | - return array_values(array_filter($files, function (Node $node) { |
|
411 | + return array_values(array_filter($files, function(Node $node) { |
|
412 | 412 | $relative = $this->getRelativePath($node->getPath()); |
413 | 413 | return $relative !== null && $relative !== '/'; |
414 | 414 | })); |
@@ -422,13 +422,13 @@ discard block |
||
422 | 422 | $rootLength = strlen($jailRoot) + 1; |
423 | 423 | if ($path === $jailRoot) { |
424 | 424 | return $mount->getMountPoint(); |
425 | - } else if (substr($path, 0, $rootLength) === $jailRoot . '/') { |
|
426 | - return $mount->getMountPoint() . substr($path, $rootLength); |
|
425 | + } else if (substr($path, 0, $rootLength) === $jailRoot.'/') { |
|
426 | + return $mount->getMountPoint().substr($path, $rootLength); |
|
427 | 427 | } else { |
428 | 428 | return null; |
429 | 429 | } |
430 | 430 | } else { |
431 | - return $mount->getMountPoint() . $path; |
|
431 | + return $mount->getMountPoint().$path; |
|
432 | 432 | } |
433 | 433 | } |
434 | 434 | } |
@@ -11,19 +11,19 @@ |
||
11 | 11 | <p class="settings-hint"><?php p($l->t('Federation allows you to connect with other trusted servers to exchange the user directory. For example this will be used to auto-complete external users for federated sharing.')); ?></p> |
12 | 12 | |
13 | 13 | <p> |
14 | - <input id="autoAddServers" type="checkbox" class="checkbox" <?php if($_['autoAddServers']) p('checked'); ?> /> |
|
14 | + <input id="autoAddServers" type="checkbox" class="checkbox" <?php if ($_['autoAddServers']) p('checked'); ?> /> |
|
15 | 15 | <label for="autoAddServers"><?php p($l->t('Add server automatically once a federated share was created successfully')); ?></label> |
16 | 16 | </p> |
17 | 17 | |
18 | 18 | <ul id="listOfTrustedServers"> |
19 | - <?php foreach($_['trustedServers'] as $trustedServer) { ?> |
|
19 | + <?php foreach ($_['trustedServers'] as $trustedServer) { ?> |
|
20 | 20 | <li id="<?php p($trustedServer['id']); ?>"> |
21 | - <?php if((int)$trustedServer['status'] === TrustedServers::STATUS_OK) { ?> |
|
21 | + <?php if ((int) $trustedServer['status'] === TrustedServers::STATUS_OK) { ?> |
|
22 | 22 | <span class="status success"></span> |
23 | 23 | <?php |
24 | - } elseif( |
|
25 | - (int)$trustedServer['status'] === TrustedServers::STATUS_PENDING || |
|
26 | - (int)$trustedServer['status'] === TrustedServers::STATUS_ACCESS_REVOKED |
|
24 | + } elseif ( |
|
25 | + (int) $trustedServer['status'] === TrustedServers::STATUS_PENDING || |
|
26 | + (int) $trustedServer['status'] === TrustedServers::STATUS_ACCESS_REVOKED |
|
27 | 27 | ) { ?> |
28 | 28 | <span class="status indeterminate"></span> |
29 | 29 | <?php } else {?> |