@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | * @param array $urlParams |
| 77 | 77 | * @param ServerContainer $server |
| 78 | 78 | */ |
| 79 | - public function __construct($appName, $urlParams = array(), ServerContainer $server = null){ |
|
| 79 | + public function __construct($appName, $urlParams = array(), ServerContainer $server = null) { |
|
| 80 | 80 | parent::__construct(); |
| 81 | 81 | $this['AppName'] = $appName; |
| 82 | 82 | $this['urlParams'] = $urlParams; |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | /** |
| 97 | 97 | * Core services |
| 98 | 98 | */ |
| 99 | - $this->registerService(IOutput::class, function($c){ |
|
| 99 | + $this->registerService(IOutput::class, function($c) { |
|
| 100 | 100 | return new Output($this->getServer()->getWebRoot()); |
| 101 | 101 | }); |
| 102 | 102 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | return $this->getServer()->getUserFolder(); |
| 105 | 105 | }); |
| 106 | 106 | |
| 107 | - $this->registerService(IAppData::class, function (SimpleContainer $c) { |
|
| 107 | + $this->registerService(IAppData::class, function(SimpleContainer $c) { |
|
| 108 | 108 | return $this->getServer()->getAppDataDir($c->query('AppName')); |
| 109 | 109 | }); |
| 110 | 110 | |
@@ -125,25 +125,25 @@ discard block |
||
| 125 | 125 | |
| 126 | 126 | $this->registerAlias(\OC\User\Session::class, \OCP\IUserSession::class); |
| 127 | 127 | |
| 128 | - $this->registerService(IServerContainer::class, function ($c) { |
|
| 128 | + $this->registerService(IServerContainer::class, function($c) { |
|
| 129 | 129 | return $this->getServer(); |
| 130 | 130 | }); |
| 131 | 131 | $this->registerAlias('ServerContainer', IServerContainer::class); |
| 132 | 132 | |
| 133 | - $this->registerService(\OCP\WorkflowEngine\IManager::class, function ($c) { |
|
| 133 | + $this->registerService(\OCP\WorkflowEngine\IManager::class, function($c) { |
|
| 134 | 134 | return $c->query('OCA\WorkflowEngine\Manager'); |
| 135 | 135 | }); |
| 136 | 136 | |
| 137 | - $this->registerService(\OCP\AppFramework\IAppContainer::class, function ($c) { |
|
| 137 | + $this->registerService(\OCP\AppFramework\IAppContainer::class, function($c) { |
|
| 138 | 138 | return $c; |
| 139 | 139 | }); |
| 140 | 140 | |
| 141 | 141 | // commonly used attributes |
| 142 | - $this->registerService('UserId', function ($c) { |
|
| 142 | + $this->registerService('UserId', function($c) { |
|
| 143 | 143 | return $c->query('OCP\\IUserSession')->getSession()->get('user_id'); |
| 144 | 144 | }); |
| 145 | 145 | |
| 146 | - $this->registerService('WebRoot', function ($c) { |
|
| 146 | + $this->registerService('WebRoot', function($c) { |
|
| 147 | 147 | return $c->query('ServerContainer')->getWebRoot(); |
| 148 | 148 | }); |
| 149 | 149 | |
@@ -151,15 +151,15 @@ discard block |
||
| 151 | 151 | return Util::getDefaultEmailAddress('no-reply'); |
| 152 | 152 | }); |
| 153 | 153 | |
| 154 | - $this->registerService('OC_Defaults', function ($c) { |
|
| 154 | + $this->registerService('OC_Defaults', function($c) { |
|
| 155 | 155 | return $c->getServer()->getThemingDefaults(); |
| 156 | 156 | }); |
| 157 | 157 | |
| 158 | - $this->registerService('OCP\Encryption\IManager', function ($c) { |
|
| 158 | + $this->registerService('OCP\Encryption\IManager', function($c) { |
|
| 159 | 159 | return $this->getServer()->getEncryptionManager(); |
| 160 | 160 | }); |
| 161 | 161 | |
| 162 | - $this->registerService('OCP\GlobalScale\IConfig', function ($c) { |
|
| 162 | + $this->registerService('OCP\GlobalScale\IConfig', function($c) { |
|
| 163 | 163 | return $c->query(OC\GlobalScale\Config::class); |
| 164 | 164 | }); |
| 165 | 165 | |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | return $c->query(Validator::class); |
| 168 | 168 | }); |
| 169 | 169 | |
| 170 | - $this->registerService(\OC\Security\IdentityProof\Manager::class, function ($c) { |
|
| 170 | + $this->registerService(\OC\Security\IdentityProof\Manager::class, function($c) { |
|
| 171 | 171 | return new \OC\Security\IdentityProof\Manager( |
| 172 | 172 | $this->getServer()->query(\OC\Files\AppData\Factory::class), |
| 173 | 173 | $this->getServer()->getCrypto() |
@@ -177,15 +177,15 @@ discard block |
||
| 177 | 177 | /** |
| 178 | 178 | * App Framework APIs |
| 179 | 179 | */ |
| 180 | - $this->registerService('API', function($c){ |
|
| 180 | + $this->registerService('API', function($c) { |
|
| 181 | 181 | $c->query('OCP\\ILogger')->debug( |
| 182 | - 'Accessing the API class is deprecated! Use the appropriate ' . |
|
| 182 | + 'Accessing the API class is deprecated! Use the appropriate '. |
|
| 183 | 183 | 'services instead!' |
| 184 | 184 | ); |
| 185 | 185 | return new API($c['AppName']); |
| 186 | 186 | }); |
| 187 | 187 | |
| 188 | - $this->registerService('Protocol', function($c){ |
|
| 188 | + $this->registerService('Protocol', function($c) { |
|
| 189 | 189 | /** @var \OC\Server $server */ |
| 190 | 190 | $server = $c->query('ServerContainer'); |
| 191 | 191 | $protocol = $server->getRequest()->getHttpProtocol(); |
@@ -273,7 +273,7 @@ discard block |
||
| 273 | 273 | ); |
| 274 | 274 | }); |
| 275 | 275 | |
| 276 | - $this->registerService('TwoFactorMiddleware', function (SimpleContainer $c) use ($app) { |
|
| 276 | + $this->registerService('TwoFactorMiddleware', function(SimpleContainer $c) use ($app) { |
|
| 277 | 277 | $twoFactorManager = $c->getServer()->getTwoFactorAuthManager(); |
| 278 | 278 | $userSession = $app->getServer()->getUserSession(); |
| 279 | 279 | $session = $app->getServer()->getSession(); |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | return new TwoFactorMiddleware($twoFactorManager, $userSession, $session, $urlGenerator, $reflector, $request); |
| 284 | 284 | }); |
| 285 | 285 | |
| 286 | - $this->registerService('OCSMiddleware', function (SimpleContainer $c) { |
|
| 286 | + $this->registerService('OCSMiddleware', function(SimpleContainer $c) { |
|
| 287 | 287 | return new OCSMiddleware( |
| 288 | 288 | $c['Request'] |
| 289 | 289 | ); |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | $dispatcher->registerMiddleware($c['BruteForceMiddleware']); |
| 300 | 300 | $dispatcher->registerMiddleware($c['RateLimitingMiddleware']); |
| 301 | 301 | |
| 302 | - foreach($middleWares as $middleWare) { |
|
| 302 | + foreach ($middleWares as $middleWare) { |
|
| 303 | 303 | $dispatcher->registerMiddleware($c[$middleWare]); |
| 304 | 304 | } |
| 305 | 305 | |
@@ -371,7 +371,7 @@ discard block |
||
| 371 | 371 | * @return mixed |
| 372 | 372 | */ |
| 373 | 373 | function log($message, $level) { |
| 374 | - switch($level){ |
|
| 374 | + switch ($level) { |
|
| 375 | 375 | case 'debug': |
| 376 | 376 | $level = \OCP\Util::DEBUG; |
| 377 | 377 | break; |
@@ -430,12 +430,12 @@ discard block |
||
| 430 | 430 | return parent::query($name); |
| 431 | 431 | } else if ($this['AppName'] === 'core' && strpos($name, 'OC\\Core\\') === 0) { |
| 432 | 432 | return parent::query($name); |
| 433 | - } else if (strpos($name, \OC\AppFramework\App::buildAppNamespace($this['AppName']) . '\\') === 0) { |
|
| 433 | + } else if (strpos($name, \OC\AppFramework\App::buildAppNamespace($this['AppName']).'\\') === 0) { |
|
| 434 | 434 | return parent::query($name); |
| 435 | 435 | } |
| 436 | 436 | } |
| 437 | 437 | |
| 438 | - throw new QueryException('Could not resolve ' . $name . '!' . |
|
| 438 | + throw new QueryException('Could not resolve '.$name.'!'. |
|
| 439 | 439 | ' Class can not be instantiated'); |
| 440 | 440 | } |
| 441 | 441 | } |
@@ -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 | |