@@ -44,7 +44,7 @@ |
||
44 | 44 | * @param string $value |
45 | 45 | * @return bool |
46 | 46 | */ |
47 | - public function executeCheck($operator, $value) { |
|
47 | + public function executeCheck($operator, $value) { |
|
48 | 48 | $actualValue = $this->getActualValue(); |
49 | 49 | if (in_array($operator, ['is', '!is'])) { |
50 | 50 | switch ($value) { |
@@ -323,7 +323,7 @@ |
||
323 | 323 | * @return int Check unique ID |
324 | 324 | */ |
325 | 325 | protected function addCheck($class, $operator, $value) { |
326 | - $hash = md5($class . '::' . $operator . '::' . $value); |
|
326 | + $hash = md5($class.'::'.$operator.'::'.$value); |
|
327 | 327 | |
328 | 328 | $query = $this->connection->getQueryBuilder(); |
329 | 329 | $query->select('id') |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $node = \OC::$server->getRootFolder() |
88 | 88 | ->getUserFolder($parameters['user']) |
89 | 89 | ->get($this->request->getParam('path')); |
90 | - return 'files/' . md5($node->getStorage()->getId() . '::' . trim($node->getInternalPath(), '/')); |
|
90 | + return 'files/'.md5($node->getStorage()->getId().'::'.trim($node->getInternalPath(), '/')); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | /** |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | |
121 | 121 | try { |
122 | 122 | $lockingProvider->acquireLock($path, $type); |
123 | - $this->config->setAppValue('testing', 'locking_' . $path, $type); |
|
123 | + $this->config->setAppValue('testing', 'locking_'.$path, $type); |
|
124 | 124 | return new \OC_OCS_Result(null, 100); |
125 | 125 | } catch (LockedException $e) { |
126 | 126 | return new \OC_OCS_Result(null, Http::STATUS_LOCKED); |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | |
146 | 146 | try { |
147 | 147 | $lockingProvider->changeLock($path, $type); |
148 | - $this->config->setAppValue('testing', 'locking_' . $path, $type); |
|
148 | + $this->config->setAppValue('testing', 'locking_'.$path, $type); |
|
149 | 149 | return new \OC_OCS_Result(null, 100); |
150 | 150 | } catch (LockedException $e) { |
151 | 151 | return new \OC_OCS_Result(null, Http::STATUS_LOCKED); |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | |
171 | 171 | try { |
172 | 172 | $lockingProvider->releaseLock($path, $type); |
173 | - $this->config->deleteAppValue('testing', 'locking_' . $path); |
|
173 | + $this->config->deleteAppValue('testing', 'locking_'.$path); |
|
174 | 174 | return new \OC_OCS_Result(null, 100); |
175 | 175 | } catch (LockedException $e) { |
176 | 176 | return new \OC_OCS_Result(null, Http::STATUS_LOCKED); |
@@ -25,7 +25,7 @@ |
||
25 | 25 | use OCA\Testing\AlternativeHomeUserBackend; |
26 | 26 | |
27 | 27 | class Application extends App { |
28 | - public function __construct (array $urlParams = array()) { |
|
28 | + public function __construct(array $urlParams = array()) { |
|
29 | 29 | $appName = 'testing'; |
30 | 30 | parent::__construct($appName, $urlParams); |
31 | 31 |
@@ -48,7 +48,7 @@ |
||
48 | 48 | if ($uid !== 'admin') { |
49 | 49 | $uid = md5($uid); |
50 | 50 | } |
51 | - return \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/' . $uid; |
|
51 | + return \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data').'/'.$uid; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | return false; |
@@ -5,16 +5,16 @@ discard block |
||
5 | 5 | ?> |
6 | 6 | |
7 | 7 | <div id="fileSharingSettings" class="followupsection"> |
8 | - <h3><?php p($l->t('Federated Cloud Sharing'));?></h3> |
|
8 | + <h3><?php p($l->t('Federated Cloud Sharing')); ?></h3> |
|
9 | 9 | <a target="_blank" rel="noreferrer" class="icon-info svg" |
10 | - title="<?php p($l->t('Open documentation'));?>" |
|
10 | + title="<?php p($l->t('Open documentation')); ?>" |
|
11 | 11 | href="<?php p(link_to_docs('admin-sharing-federated')); ?>"></a> |
12 | 12 | |
13 | 13 | <p> |
14 | 14 | <input type="checkbox" name="outgoing_server2server_share_enabled" id="outgoingServer2serverShareEnabled" class="checkbox" |
15 | 15 | value="1" <?php if ($_['outgoingServer2serverShareEnabled']) print_unescaped('checked="checked"'); ?> /> |
16 | 16 | <label for="outgoingServer2serverShareEnabled"> |
17 | - <?php p($l->t('Allow users on this server to send shares to other servers'));?> |
|
17 | + <?php p($l->t('Allow users on this server to send shares to other servers')); ?> |
|
18 | 18 | </label> |
19 | 19 | </p> |
20 | 20 | |
@@ -22,14 +22,14 @@ discard block |
||
22 | 22 | <input type="checkbox" name="incoming_server2server_share_enabled" id="incomingServer2serverShareEnabled" class="checkbox" |
23 | 23 | value="1" <?php if ($_['incomingServer2serverShareEnabled']) print_unescaped('checked="checked"'); ?> /> |
24 | 24 | <label for="incomingServer2serverShareEnabled"> |
25 | - <?php p($l->t('Allow users on this server to receive shares from other servers'));?> |
|
25 | + <?php p($l->t('Allow users on this server to receive shares from other servers')); ?> |
|
26 | 26 | </label><br/> |
27 | 27 | </p> |
28 | 28 | <p> |
29 | 29 | <input type="checkbox" name="lookupServerEnabled" id="lookupServerEnabled" class="checkbox" |
30 | 30 | value="1" <?php if ($_['lookupServerEnabled']) print_unescaped('checked="checked"'); ?> /> |
31 | 31 | <label for="lookupServerEnabled"> |
32 | - <?php p($l->t('Search global and public address book for users'));?> |
|
32 | + <?php p($l->t('Search global and public address book for users')); ?> |
|
33 | 33 | </label><br/> |
34 | 34 | </p> |
35 | 35 | </div> |
@@ -39,16 +39,16 @@ |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | $cloudID = \OC::$server->getUserSession()->getUser()->getCloudId(); |
42 | -$url = 'https://nextcloud.com/federation#' . $cloudID; |
|
42 | +$url = 'https://nextcloud.com/federation#'.$cloudID; |
|
43 | 43 | $logoPath = \OC::$server->getURLGenerator()->imagePath('core', 'logo-icon.svg'); |
44 | 44 | $theme = \OC::$server->getThemingDefaults(); |
45 | 45 | $color = $theme->getMailHeaderColor(); |
46 | 46 | $textColor = "#ffffff"; |
47 | -if(\OC::$server->getAppManager()->isEnabledForUser("theming")) { |
|
47 | +if (\OC::$server->getAppManager()->isEnabledForUser("theming")) { |
|
48 | 48 | $logoPath = $theme->getLogo(); |
49 | 49 | try { |
50 | 50 | $util = \OC::$server->query("\OCA\Theming\Util"); |
51 | - if($util->invertTextColor($color)) { |
|
51 | + if ($util->invertTextColor($color)) { |
|
52 | 52 | $textColor = "#000000"; |
53 | 53 | } |
54 | 54 | } catch (OCP\AppFramework\QueryException $e) { |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | 'remoteId' => $shareId |
134 | 134 | ); |
135 | 135 | |
136 | - $result = $this->tryHttpPostToShareEndpoint(rtrim($remote, '/'), '/' . $id . '/reshare', $fields); |
|
136 | + $result = $this->tryHttpPostToShareEndpoint(rtrim($remote, '/'), '/'.$id.'/reshare', $fields); |
|
137 | 137 | $status = json_decode($result['result'], true); |
138 | 138 | |
139 | 139 | $httpRequestSuccessful = $result['success']; |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | if ($httpRequestSuccessful && $ocsCallSuccessful && $validToken && $validRemoteId) { |
145 | 145 | return [ |
146 | 146 | $status['ocs']['data']['token'], |
147 | - (int)$status['ocs']['data']['remoteId'] |
|
147 | + (int) $status['ocs']['data']['remoteId'] |
|
148 | 148 | ]; |
149 | 149 | } |
150 | 150 | |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | $fields[$key] = $value; |
229 | 229 | } |
230 | 230 | |
231 | - $result = $this->tryHttpPostToShareEndpoint(rtrim($remote, '/'), '/' . $remoteId . '/' . $action, $fields); |
|
231 | + $result = $this->tryHttpPostToShareEndpoint(rtrim($remote, '/'), '/'.$remoteId.'/'.$action, $fields); |
|
232 | 232 | $status = json_decode($result['result'], true); |
233 | 233 | |
234 | 234 | if ($result['success'] && |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | $client = $this->httpClientService->newClient(); |
280 | 280 | |
281 | 281 | if ($this->addressHandler->urlContainProtocol($remoteDomain) === false) { |
282 | - $remoteDomain = 'https://' . $remoteDomain; |
|
282 | + $remoteDomain = 'https://'.$remoteDomain; |
|
283 | 283 | } |
284 | 284 | |
285 | 285 | $result = [ |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | |
290 | 290 | $endpoint = $this->discoveryManager->getShareEndpoint($remoteDomain); |
291 | 291 | try { |
292 | - $response = $client->post($remoteDomain . $endpoint . $urlSuffix . '?format=' . self::RESPONSE_FORMAT, [ |
|
292 | + $response = $client->post($remoteDomain.$endpoint.$urlSuffix.'?format='.self::RESPONSE_FORMAT, [ |
|
293 | 293 | 'body' => $fields, |
294 | 294 | 'timeout' => 10, |
295 | 295 | 'connect_timeout' => 10, |
@@ -184,12 +184,12 @@ |
||
184 | 184 | } |
185 | 185 | |
186 | 186 | try { |
187 | - $this->getDisplayNameFromContact($user . '@http://' . $server); |
|
187 | + $this->getDisplayNameFromContact($user.'@http://'.$server); |
|
188 | 188 | } catch (\OutOfBoundsException $e) { |
189 | 189 | } |
190 | 190 | |
191 | 191 | try { |
192 | - $this->getDisplayNameFromContact($user . '@https://' . $server); |
|
192 | + $this->getDisplayNameFromContact($user.'@https://'.$server); |
|
193 | 193 | } catch (\OutOfBoundsException $e) { |
194 | 194 | } |
195 | 195 |