@@ -4,12 +4,12 @@ discard block |
||
4 | 4 | script('federatedfilesharing', 'settings-admin'); |
5 | 5 | ?> |
6 | 6 | |
7 | -<?php if($_['internalOnly'] === false): ?> |
|
7 | +<?php if ($_['internalOnly'] === false): ?> |
|
8 | 8 | |
9 | 9 | <div id="fileSharingSettings" class="followupsection"> |
10 | - <h3><?php p($l->t('Federated Cloud Sharing'));?></h3> |
|
10 | + <h3><?php p($l->t('Federated Cloud Sharing')); ?></h3> |
|
11 | 11 | <a target="_blank" rel="noreferrer" class="icon-info svg" |
12 | - title="<?php p($l->t('Open documentation'));?>" |
|
12 | + title="<?php p($l->t('Open documentation')); ?>" |
|
13 | 13 | href="<?php p(link_to_docs('admin-sharing-federated')); ?>"></a> |
14 | 14 | <p class="settings-hint"><?php p($l->t('Adjust how people can share between servers.')); ?></p> |
15 | 15 | |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | <input type="checkbox" name="outgoing_server2server_share_enabled" id="outgoingServer2serverShareEnabled" class="checkbox" |
18 | 18 | value="1" <?php if ($_['outgoingServer2serverShareEnabled']) print_unescaped('checked="checked"'); ?> /> |
19 | 19 | <label for="outgoingServer2serverShareEnabled"> |
20 | - <?php p($l->t('Allow users on this server to send shares to other servers'));?> |
|
20 | + <?php p($l->t('Allow users on this server to send shares to other servers')); ?> |
|
21 | 21 | </label> |
22 | 22 | </p> |
23 | 23 | |
@@ -25,21 +25,21 @@ discard block |
||
25 | 25 | <input type="checkbox" name="incoming_server2server_share_enabled" id="incomingServer2serverShareEnabled" class="checkbox" |
26 | 26 | value="1" <?php if ($_['incomingServer2serverShareEnabled']) print_unescaped('checked="checked"'); ?> /> |
27 | 27 | <label for="incomingServer2serverShareEnabled"> |
28 | - <?php p($l->t('Allow users on this server to receive shares from other servers'));?> |
|
28 | + <?php p($l->t('Allow users on this server to receive shares from other servers')); ?> |
|
29 | 29 | </label><br/> |
30 | 30 | </p> |
31 | 31 | <p> |
32 | 32 | <input type="checkbox" name="lookupServerEnabled" id="lookupServerEnabled" class="checkbox" |
33 | 33 | value="1" <?php if ($_['lookupServerEnabled']) print_unescaped('checked="checked"'); ?> /> |
34 | 34 | <label for="lookupServerEnabled"> |
35 | - <?php p($l->t('Search global and public address book for users and let local users publish their data'));?> |
|
35 | + <?php p($l->t('Search global and public address book for users and let local users publish their data')); ?> |
|
36 | 36 | </label><br/> |
37 | 37 | </p> |
38 | 38 | <p> |
39 | 39 | <input type="checkbox" name="lookupServerUploadEnabled" id="lookupServerUploadEnabled" class="checkbox" |
40 | 40 | value="1" <?php if ($_['lookupServerUploadEnabled']) print_unescaped('checked="checked"'); ?> /> |
41 | 41 | <label for="lookupServerUploadEnabled"> |
42 | - <?php p($l->t('Allow users to publish their data to a global and public address book'));?> |
|
42 | + <?php p($l->t('Allow users to publish their data to a global and public address book')); ?> |
|
43 | 43 | </label><br/> |
44 | 44 | </p> |
45 | 45 |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | * @param array $urlParams |
78 | 78 | * @param ServerContainer $server |
79 | 79 | */ |
80 | - public function __construct($appName, $urlParams = array(), ServerContainer $server = null){ |
|
80 | + public function __construct($appName, $urlParams = array(), ServerContainer $server = null) { |
|
81 | 81 | parent::__construct(); |
82 | 82 | $this['AppName'] = $appName; |
83 | 83 | $this['urlParams'] = $urlParams; |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | /** |
98 | 98 | * Core services |
99 | 99 | */ |
100 | - $this->registerService(IOutput::class, function($c){ |
|
100 | + $this->registerService(IOutput::class, function($c) { |
|
101 | 101 | return new Output($this->getServer()->getWebRoot()); |
102 | 102 | }); |
103 | 103 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | return $this->getServer()->getUserFolder(); |
106 | 106 | }); |
107 | 107 | |
108 | - $this->registerService(IAppData::class, function (SimpleContainer $c) { |
|
108 | + $this->registerService(IAppData::class, function(SimpleContainer $c) { |
|
109 | 109 | return $this->getServer()->getAppDataDir($c->query('AppName')); |
110 | 110 | }); |
111 | 111 | |
@@ -126,25 +126,25 @@ discard block |
||
126 | 126 | |
127 | 127 | $this->registerAlias(\OC\User\Session::class, \OCP\IUserSession::class); |
128 | 128 | |
129 | - $this->registerService(IServerContainer::class, function ($c) { |
|
129 | + $this->registerService(IServerContainer::class, function($c) { |
|
130 | 130 | return $this->getServer(); |
131 | 131 | }); |
132 | 132 | $this->registerAlias('ServerContainer', IServerContainer::class); |
133 | 133 | |
134 | - $this->registerService(\OCP\WorkflowEngine\IManager::class, function ($c) { |
|
134 | + $this->registerService(\OCP\WorkflowEngine\IManager::class, function($c) { |
|
135 | 135 | return $c->query('OCA\WorkflowEngine\Manager'); |
136 | 136 | }); |
137 | 137 | |
138 | - $this->registerService(\OCP\AppFramework\IAppContainer::class, function ($c) { |
|
138 | + $this->registerService(\OCP\AppFramework\IAppContainer::class, function($c) { |
|
139 | 139 | return $c; |
140 | 140 | }); |
141 | 141 | |
142 | 142 | // commonly used attributes |
143 | - $this->registerService('UserId', function ($c) { |
|
143 | + $this->registerService('UserId', function($c) { |
|
144 | 144 | return $c->query('OCP\\IUserSession')->getSession()->get('user_id'); |
145 | 145 | }); |
146 | 146 | |
147 | - $this->registerService('WebRoot', function ($c) { |
|
147 | + $this->registerService('WebRoot', function($c) { |
|
148 | 148 | return $c->query('ServerContainer')->getWebRoot(); |
149 | 149 | }); |
150 | 150 | |
@@ -152,15 +152,15 @@ discard block |
||
152 | 152 | return Util::getDefaultEmailAddress('no-reply'); |
153 | 153 | }); |
154 | 154 | |
155 | - $this->registerService('OC_Defaults', function ($c) { |
|
155 | + $this->registerService('OC_Defaults', function($c) { |
|
156 | 156 | return $c->getServer()->getThemingDefaults(); |
157 | 157 | }); |
158 | 158 | |
159 | - $this->registerService('OCP\Encryption\IManager', function ($c) { |
|
159 | + $this->registerService('OCP\Encryption\IManager', function($c) { |
|
160 | 160 | return $this->getServer()->getEncryptionManager(); |
161 | 161 | }); |
162 | 162 | |
163 | - $this->registerService(IConfig::class, function ($c) { |
|
163 | + $this->registerService(IConfig::class, function($c) { |
|
164 | 164 | return $c->query(OC\GlobalScale\Config::class); |
165 | 165 | }); |
166 | 166 | |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | return $c->query(Validator::class); |
169 | 169 | }); |
170 | 170 | |
171 | - $this->registerService(\OC\Security\IdentityProof\Manager::class, function ($c) { |
|
171 | + $this->registerService(\OC\Security\IdentityProof\Manager::class, function($c) { |
|
172 | 172 | return new \OC\Security\IdentityProof\Manager( |
173 | 173 | $this->getServer()->query(\OC\Files\AppData\Factory::class), |
174 | 174 | $this->getServer()->getCrypto() |
@@ -178,15 +178,15 @@ discard block |
||
178 | 178 | /** |
179 | 179 | * App Framework APIs |
180 | 180 | */ |
181 | - $this->registerService('API', function($c){ |
|
181 | + $this->registerService('API', function($c) { |
|
182 | 182 | $c->query('OCP\\ILogger')->debug( |
183 | - 'Accessing the API class is deprecated! Use the appropriate ' . |
|
183 | + 'Accessing the API class is deprecated! Use the appropriate '. |
|
184 | 184 | 'services instead!' |
185 | 185 | ); |
186 | 186 | return new API($c['AppName']); |
187 | 187 | }); |
188 | 188 | |
189 | - $this->registerService('Protocol', function($c){ |
|
189 | + $this->registerService('Protocol', function($c) { |
|
190 | 190 | /** @var \OC\Server $server */ |
191 | 191 | $server = $c->query('ServerContainer'); |
192 | 192 | $protocol = $server->getRequest()->getHttpProtocol(); |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | ); |
275 | 275 | }); |
276 | 276 | |
277 | - $this->registerService('TwoFactorMiddleware', function (SimpleContainer $c) use ($app) { |
|
277 | + $this->registerService('TwoFactorMiddleware', function(SimpleContainer $c) use ($app) { |
|
278 | 278 | $twoFactorManager = $c->getServer()->getTwoFactorAuthManager(); |
279 | 279 | $userSession = $app->getServer()->getUserSession(); |
280 | 280 | $session = $app->getServer()->getSession(); |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | return new TwoFactorMiddleware($twoFactorManager, $userSession, $session, $urlGenerator, $reflector, $request); |
285 | 285 | }); |
286 | 286 | |
287 | - $this->registerService('OCSMiddleware', function (SimpleContainer $c) { |
|
287 | + $this->registerService('OCSMiddleware', function(SimpleContainer $c) { |
|
288 | 288 | return new OCSMiddleware( |
289 | 289 | $c['Request'] |
290 | 290 | ); |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | $dispatcher->registerMiddleware($c['BruteForceMiddleware']); |
301 | 301 | $dispatcher->registerMiddleware($c['RateLimitingMiddleware']); |
302 | 302 | |
303 | - foreach($middleWares as $middleWare) { |
|
303 | + foreach ($middleWares as $middleWare) { |
|
304 | 304 | $dispatcher->registerMiddleware($c[$middleWare]); |
305 | 305 | } |
306 | 306 | |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | * @return mixed |
373 | 373 | */ |
374 | 374 | function log($message, $level) { |
375 | - switch($level){ |
|
375 | + switch ($level) { |
|
376 | 376 | case 'debug': |
377 | 377 | $level = \OCP\Util::DEBUG; |
378 | 378 | break; |
@@ -431,12 +431,12 @@ discard block |
||
431 | 431 | return parent::query($name); |
432 | 432 | } else if ($this['AppName'] === 'core' && strpos($name, 'OC\\Core\\') === 0) { |
433 | 433 | return parent::query($name); |
434 | - } else if (strpos($name, \OC\AppFramework\App::buildAppNamespace($this['AppName']) . '\\') === 0) { |
|
434 | + } else if (strpos($name, \OC\AppFramework\App::buildAppNamespace($this['AppName']).'\\') === 0) { |
|
435 | 435 | return parent::query($name); |
436 | 436 | } |
437 | 437 | } |
438 | 438 | |
439 | - throw new QueryException('Could not resolve ' . $name . '!' . |
|
439 | + throw new QueryException('Could not resolve '.$name.'!'. |
|
440 | 440 | ' Class can not be instantiated'); |
441 | 441 | } |
442 | 442 | } |