@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | $this->defaultLogoClaim = ''; |
| 66 | 66 | $this->defaultMailHeaderColor = '#0082c9'; /* header color of mail notifications */ |
| 67 | 67 | |
| 68 | - $themePath = OC::$SERVERROOT . '/themes/' . OC_Util::getTheme() . '/defaults.php'; |
|
| 68 | + $themePath = OC::$SERVERROOT.'/themes/'.OC_Util::getTheme().'/defaults.php'; |
|
| 69 | 69 | if (file_exists($themePath)) { |
| 70 | 70 | // prevent defaults.php from printing output |
| 71 | 71 | ob_start(); |
@@ -239,9 +239,9 @@ discard block |
||
| 239 | 239 | if ($this->themeExist('getShortFooter')) { |
| 240 | 240 | $footer = $this->theme->getShortFooter(); |
| 241 | 241 | } else { |
| 242 | - $footer = '<a href="'. $this->getBaseUrl() . '" target="_blank"' . |
|
| 243 | - ' rel="noreferrer">' .$this->getEntity() . '</a>'. |
|
| 244 | - ' – ' . $this->getSlogan(); |
|
| 242 | + $footer = '<a href="'.$this->getBaseUrl().'" target="_blank"'. |
|
| 243 | + ' rel="noreferrer">'.$this->getEntity().'</a>'. |
|
| 244 | + ' – '.$this->getSlogan(); |
|
| 245 | 245 | } |
| 246 | 246 | |
| 247 | 247 | return $footer; |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | if ($this->themeExist('buildDocLinkToKey')) { |
| 269 | 269 | return $this->theme->buildDocLinkToKey($key); |
| 270 | 270 | } |
| 271 | - return $this->getDocBaseUrl() . '/server/' . $this->defaultDocVersion . '/go.php?to=' . $key; |
|
| 271 | + return $this->getDocBaseUrl().'/server/'.$this->defaultDocVersion.'/go.php?to='.$key; |
|
| 272 | 272 | } |
| 273 | 273 | |
| 274 | 274 | /** |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | * @return array scss variables to overwrite |
| 288 | 288 | */ |
| 289 | 289 | public function getScssVariables() { |
| 290 | - if($this->themeExist('getScssVariables')) { |
|
| 290 | + if ($this->themeExist('getScssVariables')) { |
|
| 291 | 291 | return $this->theme->getScssVariables(); |
| 292 | 292 | } |
| 293 | 293 | return []; |
@@ -95,7 +95,6 @@ |
||
| 95 | 95 | use OC\Tagging\TagMapper; |
| 96 | 96 | use OC\Template\SCSSCacher; |
| 97 | 97 | use OCA\Theming\ThemingDefaults; |
| 98 | - |
|
| 99 | 98 | use OCP\App\IAppManager; |
| 100 | 99 | use OCA\Theming\Util; |
| 101 | 100 | use OCP\Federation\ICloudIdManager; |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | $this->registerAlias(\OCP\Contacts\IManager::class, \OC\ContactsManager::class); |
| 134 | 134 | $this->registerAlias('ContactsManager', \OCP\Contacts\IManager::class); |
| 135 | 135 | |
| 136 | - $this->registerService(\OCP\IPreview::class, function (Server $c) { |
|
| 136 | + $this->registerService(\OCP\IPreview::class, function(Server $c) { |
|
| 137 | 137 | return new PreviewManager( |
| 138 | 138 | $c->getConfig(), |
| 139 | 139 | $c->getRootFolder(), |
@@ -144,13 +144,13 @@ discard block |
||
| 144 | 144 | }); |
| 145 | 145 | $this->registerAlias('PreviewManager', \OCP\IPreview::class); |
| 146 | 146 | |
| 147 | - $this->registerService(\OC\Preview\Watcher::class, function (Server $c) { |
|
| 147 | + $this->registerService(\OC\Preview\Watcher::class, function(Server $c) { |
|
| 148 | 148 | return new \OC\Preview\Watcher( |
| 149 | 149 | $c->getAppDataDir('preview') |
| 150 | 150 | ); |
| 151 | 151 | }); |
| 152 | 152 | |
| 153 | - $this->registerService('EncryptionManager', function (Server $c) { |
|
| 153 | + $this->registerService('EncryptionManager', function(Server $c) { |
|
| 154 | 154 | $view = new View(); |
| 155 | 155 | $util = new Encryption\Util( |
| 156 | 156 | $view, |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | ); |
| 169 | 169 | }); |
| 170 | 170 | |
| 171 | - $this->registerService('EncryptionFileHelper', function (Server $c) { |
|
| 171 | + $this->registerService('EncryptionFileHelper', function(Server $c) { |
|
| 172 | 172 | $util = new Encryption\Util( |
| 173 | 173 | new View(), |
| 174 | 174 | $c->getUserManager(), |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | return new Encryption\File($util); |
| 179 | 179 | }); |
| 180 | 180 | |
| 181 | - $this->registerService('EncryptionKeyStorage', function (Server $c) { |
|
| 181 | + $this->registerService('EncryptionKeyStorage', function(Server $c) { |
|
| 182 | 182 | $view = new View(); |
| 183 | 183 | $util = new Encryption\Util( |
| 184 | 184 | $view, |
@@ -189,32 +189,32 @@ discard block |
||
| 189 | 189 | |
| 190 | 190 | return new Encryption\Keys\Storage($view, $util); |
| 191 | 191 | }); |
| 192 | - $this->registerService('TagMapper', function (Server $c) { |
|
| 192 | + $this->registerService('TagMapper', function(Server $c) { |
|
| 193 | 193 | return new TagMapper($c->getDatabaseConnection()); |
| 194 | 194 | }); |
| 195 | 195 | |
| 196 | - $this->registerService(\OCP\ITagManager::class, function (Server $c) { |
|
| 196 | + $this->registerService(\OCP\ITagManager::class, function(Server $c) { |
|
| 197 | 197 | $tagMapper = $c->query('TagMapper'); |
| 198 | 198 | return new TagManager($tagMapper, $c->getUserSession()); |
| 199 | 199 | }); |
| 200 | 200 | $this->registerAlias('TagManager', \OCP\ITagManager::class); |
| 201 | 201 | |
| 202 | - $this->registerService('SystemTagManagerFactory', function (Server $c) { |
|
| 202 | + $this->registerService('SystemTagManagerFactory', function(Server $c) { |
|
| 203 | 203 | $config = $c->getConfig(); |
| 204 | 204 | $factoryClass = $config->getSystemValue('systemtags.managerFactory', '\OC\SystemTag\ManagerFactory'); |
| 205 | 205 | /** @var \OC\SystemTag\ManagerFactory $factory */ |
| 206 | 206 | $factory = new $factoryClass($this); |
| 207 | 207 | return $factory; |
| 208 | 208 | }); |
| 209 | - $this->registerService(\OCP\SystemTag\ISystemTagManager::class, function (Server $c) { |
|
| 209 | + $this->registerService(\OCP\SystemTag\ISystemTagManager::class, function(Server $c) { |
|
| 210 | 210 | return $c->query('SystemTagManagerFactory')->getManager(); |
| 211 | 211 | }); |
| 212 | 212 | $this->registerAlias('SystemTagManager', \OCP\SystemTag\ISystemTagManager::class); |
| 213 | 213 | |
| 214 | - $this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function (Server $c) { |
|
| 214 | + $this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function(Server $c) { |
|
| 215 | 215 | return $c->query('SystemTagManagerFactory')->getObjectMapper(); |
| 216 | 216 | }); |
| 217 | - $this->registerService('RootFolder', function (Server $c) { |
|
| 217 | + $this->registerService('RootFolder', function(Server $c) { |
|
| 218 | 218 | $manager = \OC\Files\Filesystem::getMountManager(null); |
| 219 | 219 | $view = new View(); |
| 220 | 220 | $root = new Root( |
@@ -242,30 +242,30 @@ discard block |
||
| 242 | 242 | }); |
| 243 | 243 | $this->registerAlias('LazyRootFolder', \OCP\Files\IRootFolder::class); |
| 244 | 244 | |
| 245 | - $this->registerService(\OCP\IUserManager::class, function (Server $c) { |
|
| 245 | + $this->registerService(\OCP\IUserManager::class, function(Server $c) { |
|
| 246 | 246 | $config = $c->getConfig(); |
| 247 | 247 | return new \OC\User\Manager($config); |
| 248 | 248 | }); |
| 249 | 249 | $this->registerAlias('UserManager', \OCP\IUserManager::class); |
| 250 | 250 | |
| 251 | - $this->registerService(\OCP\IGroupManager::class, function (Server $c) { |
|
| 251 | + $this->registerService(\OCP\IGroupManager::class, function(Server $c) { |
|
| 252 | 252 | $groupManager = new \OC\Group\Manager($this->getUserManager(), $this->getLogger()); |
| 253 | - $groupManager->listen('\OC\Group', 'preCreate', function ($gid) { |
|
| 253 | + $groupManager->listen('\OC\Group', 'preCreate', function($gid) { |
|
| 254 | 254 | \OC_Hook::emit('OC_Group', 'pre_createGroup', array('run' => true, 'gid' => $gid)); |
| 255 | 255 | }); |
| 256 | - $groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $gid) { |
|
| 256 | + $groupManager->listen('\OC\Group', 'postCreate', function(\OC\Group\Group $gid) { |
|
| 257 | 257 | \OC_Hook::emit('OC_User', 'post_createGroup', array('gid' => $gid->getGID())); |
| 258 | 258 | }); |
| 259 | - $groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) { |
|
| 259 | + $groupManager->listen('\OC\Group', 'preDelete', function(\OC\Group\Group $group) { |
|
| 260 | 260 | \OC_Hook::emit('OC_Group', 'pre_deleteGroup', array('run' => true, 'gid' => $group->getGID())); |
| 261 | 261 | }); |
| 262 | - $groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) { |
|
| 262 | + $groupManager->listen('\OC\Group', 'postDelete', function(\OC\Group\Group $group) { |
|
| 263 | 263 | \OC_Hook::emit('OC_User', 'post_deleteGroup', array('gid' => $group->getGID())); |
| 264 | 264 | }); |
| 265 | - $groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
| 265 | + $groupManager->listen('\OC\Group', 'preAddUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
| 266 | 266 | \OC_Hook::emit('OC_Group', 'pre_addToGroup', array('run' => true, 'uid' => $user->getUID(), 'gid' => $group->getGID())); |
| 267 | 267 | }); |
| 268 | - $groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
| 268 | + $groupManager->listen('\OC\Group', 'postAddUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
| 269 | 269 | \OC_Hook::emit('OC_Group', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID())); |
| 270 | 270 | //Minimal fix to keep it backward compatible TODO: clean up all the GroupManager hooks |
| 271 | 271 | \OC_Hook::emit('OC_User', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID())); |
@@ -285,11 +285,11 @@ discard block |
||
| 285 | 285 | return new Store($session, $logger, $tokenProvider); |
| 286 | 286 | }); |
| 287 | 287 | $this->registerAlias(IStore::class, Store::class); |
| 288 | - $this->registerService('OC\Authentication\Token\DefaultTokenMapper', function (Server $c) { |
|
| 288 | + $this->registerService('OC\Authentication\Token\DefaultTokenMapper', function(Server $c) { |
|
| 289 | 289 | $dbConnection = $c->getDatabaseConnection(); |
| 290 | 290 | return new Authentication\Token\DefaultTokenMapper($dbConnection); |
| 291 | 291 | }); |
| 292 | - $this->registerService('OC\Authentication\Token\DefaultTokenProvider', function (Server $c) { |
|
| 292 | + $this->registerService('OC\Authentication\Token\DefaultTokenProvider', function(Server $c) { |
|
| 293 | 293 | $mapper = $c->query('OC\Authentication\Token\DefaultTokenMapper'); |
| 294 | 294 | $crypto = $c->getCrypto(); |
| 295 | 295 | $config = $c->getConfig(); |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | }); |
| 300 | 300 | $this->registerAlias('OC\Authentication\Token\IProvider', 'OC\Authentication\Token\DefaultTokenProvider'); |
| 301 | 301 | |
| 302 | - $this->registerService(\OCP\IUserSession::class, function (Server $c) { |
|
| 302 | + $this->registerService(\OCP\IUserSession::class, function(Server $c) { |
|
| 303 | 303 | $manager = $c->getUserManager(); |
| 304 | 304 | $session = new \OC\Session\Memory(''); |
| 305 | 305 | $timeFactory = new TimeFactory(); |
@@ -312,40 +312,40 @@ discard block |
||
| 312 | 312 | } |
| 313 | 313 | |
| 314 | 314 | $userSession = new \OC\User\Session($manager, $session, $timeFactory, $defaultTokenProvider, $c->getConfig(), $c->getSecureRandom()); |
| 315 | - $userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) { |
|
| 315 | + $userSession->listen('\OC\User', 'preCreateUser', function($uid, $password) { |
|
| 316 | 316 | \OC_Hook::emit('OC_User', 'pre_createUser', array('run' => true, 'uid' => $uid, 'password' => $password)); |
| 317 | 317 | }); |
| 318 | - $userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) { |
|
| 318 | + $userSession->listen('\OC\User', 'postCreateUser', function($user, $password) { |
|
| 319 | 319 | /** @var $user \OC\User\User */ |
| 320 | 320 | \OC_Hook::emit('OC_User', 'post_createUser', array('uid' => $user->getUID(), 'password' => $password)); |
| 321 | 321 | }); |
| 322 | - $userSession->listen('\OC\User', 'preDelete', function ($user) { |
|
| 322 | + $userSession->listen('\OC\User', 'preDelete', function($user) { |
|
| 323 | 323 | /** @var $user \OC\User\User */ |
| 324 | 324 | \OC_Hook::emit('OC_User', 'pre_deleteUser', array('run' => true, 'uid' => $user->getUID())); |
| 325 | 325 | }); |
| 326 | - $userSession->listen('\OC\User', 'postDelete', function ($user) { |
|
| 326 | + $userSession->listen('\OC\User', 'postDelete', function($user) { |
|
| 327 | 327 | /** @var $user \OC\User\User */ |
| 328 | 328 | \OC_Hook::emit('OC_User', 'post_deleteUser', array('uid' => $user->getUID())); |
| 329 | 329 | }); |
| 330 | - $userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) { |
|
| 330 | + $userSession->listen('\OC\User', 'preSetPassword', function($user, $password, $recoveryPassword) { |
|
| 331 | 331 | /** @var $user \OC\User\User */ |
| 332 | 332 | \OC_Hook::emit('OC_User', 'pre_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword)); |
| 333 | 333 | }); |
| 334 | - $userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) { |
|
| 334 | + $userSession->listen('\OC\User', 'postSetPassword', function($user, $password, $recoveryPassword) { |
|
| 335 | 335 | /** @var $user \OC\User\User */ |
| 336 | 336 | \OC_Hook::emit('OC_User', 'post_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword)); |
| 337 | 337 | }); |
| 338 | - $userSession->listen('\OC\User', 'preLogin', function ($uid, $password) { |
|
| 338 | + $userSession->listen('\OC\User', 'preLogin', function($uid, $password) { |
|
| 339 | 339 | \OC_Hook::emit('OC_User', 'pre_login', array('run' => true, 'uid' => $uid, 'password' => $password)); |
| 340 | 340 | }); |
| 341 | - $userSession->listen('\OC\User', 'postLogin', function ($user, $password) { |
|
| 341 | + $userSession->listen('\OC\User', 'postLogin', function($user, $password) { |
|
| 342 | 342 | /** @var $user \OC\User\User */ |
| 343 | 343 | \OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password)); |
| 344 | 344 | }); |
| 345 | - $userSession->listen('\OC\User', 'logout', function () { |
|
| 345 | + $userSession->listen('\OC\User', 'logout', function() { |
|
| 346 | 346 | \OC_Hook::emit('OC_User', 'logout', array()); |
| 347 | 347 | }); |
| 348 | - $userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value) { |
|
| 348 | + $userSession->listen('\OC\User', 'changeUser', function($user, $feature, $value) { |
|
| 349 | 349 | /** @var $user \OC\User\User */ |
| 350 | 350 | \OC_Hook::emit('OC_User', 'changeUser', array('run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value)); |
| 351 | 351 | }); |
@@ -353,11 +353,11 @@ discard block |
||
| 353 | 353 | }); |
| 354 | 354 | $this->registerAlias('UserSession', \OCP\IUserSession::class); |
| 355 | 355 | |
| 356 | - $this->registerService(\OC\Authentication\TwoFactorAuth\Manager::class, function (Server $c) { |
|
| 356 | + $this->registerService(\OC\Authentication\TwoFactorAuth\Manager::class, function(Server $c) { |
|
| 357 | 357 | return new \OC\Authentication\TwoFactorAuth\Manager($c->getAppManager(), $c->getSession(), $c->getConfig(), $c->getActivityManager(), $c->getLogger()); |
| 358 | 358 | }); |
| 359 | 359 | |
| 360 | - $this->registerService(\OCP\INavigationManager::class, function (Server $c) { |
|
| 360 | + $this->registerService(\OCP\INavigationManager::class, function(Server $c) { |
|
| 361 | 361 | return new \OC\NavigationManager($c->getAppManager(), |
| 362 | 362 | $c->getURLGenerator(), |
| 363 | 363 | $c->getL10NFactory(), |
@@ -366,7 +366,7 @@ discard block |
||
| 366 | 366 | }); |
| 367 | 367 | $this->registerAlias('NavigationManager', \OCP\INavigationManager::class); |
| 368 | 368 | |
| 369 | - $this->registerService(\OC\AllConfig::class, function (Server $c) { |
|
| 369 | + $this->registerService(\OC\AllConfig::class, function(Server $c) { |
|
| 370 | 370 | return new \OC\AllConfig( |
| 371 | 371 | $c->getSystemConfig() |
| 372 | 372 | ); |
@@ -374,17 +374,17 @@ discard block |
||
| 374 | 374 | $this->registerAlias('AllConfig', \OC\AllConfig::class); |
| 375 | 375 | $this->registerAlias(\OCP\IConfig::class, \OC\AllConfig::class); |
| 376 | 376 | |
| 377 | - $this->registerService('SystemConfig', function ($c) use ($config) { |
|
| 377 | + $this->registerService('SystemConfig', function($c) use ($config) { |
|
| 378 | 378 | return new \OC\SystemConfig($config); |
| 379 | 379 | }); |
| 380 | 380 | |
| 381 | - $this->registerService(\OC\AppConfig::class, function (Server $c) { |
|
| 381 | + $this->registerService(\OC\AppConfig::class, function(Server $c) { |
|
| 382 | 382 | return new \OC\AppConfig($c->getDatabaseConnection()); |
| 383 | 383 | }); |
| 384 | 384 | $this->registerAlias('AppConfig', \OC\AppConfig::class); |
| 385 | 385 | $this->registerAlias(\OCP\IAppConfig::class, \OC\AppConfig::class); |
| 386 | 386 | |
| 387 | - $this->registerService(\OCP\L10N\IFactory::class, function (Server $c) { |
|
| 387 | + $this->registerService(\OCP\L10N\IFactory::class, function(Server $c) { |
|
| 388 | 388 | return new \OC\L10N\Factory( |
| 389 | 389 | $c->getConfig(), |
| 390 | 390 | $c->getRequest(), |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | }); |
| 395 | 395 | $this->registerAlias('L10NFactory', \OCP\L10N\IFactory::class); |
| 396 | 396 | |
| 397 | - $this->registerService(\OCP\IURLGenerator::class, function (Server $c) { |
|
| 397 | + $this->registerService(\OCP\IURLGenerator::class, function(Server $c) { |
|
| 398 | 398 | $config = $c->getConfig(); |
| 399 | 399 | $cacheFactory = $c->getMemCacheFactory(); |
| 400 | 400 | return new \OC\URLGenerator( |
@@ -404,10 +404,10 @@ discard block |
||
| 404 | 404 | }); |
| 405 | 405 | $this->registerAlias('URLGenerator', \OCP\IURLGenerator::class); |
| 406 | 406 | |
| 407 | - $this->registerService('AppHelper', function ($c) { |
|
| 407 | + $this->registerService('AppHelper', function($c) { |
|
| 408 | 408 | return new \OC\AppHelper(); |
| 409 | 409 | }); |
| 410 | - $this->registerService('AppFetcher', function ($c) { |
|
| 410 | + $this->registerService('AppFetcher', function($c) { |
|
| 411 | 411 | return new AppFetcher( |
| 412 | 412 | $this->getAppDataDir('appstore'), |
| 413 | 413 | $this->getHTTPClientService(), |
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | $this->getConfig() |
| 416 | 416 | ); |
| 417 | 417 | }); |
| 418 | - $this->registerService('CategoryFetcher', function ($c) { |
|
| 418 | + $this->registerService('CategoryFetcher', function($c) { |
|
| 419 | 419 | return new CategoryFetcher( |
| 420 | 420 | $this->getAppDataDir('appstore'), |
| 421 | 421 | $this->getHTTPClientService(), |
@@ -424,21 +424,21 @@ discard block |
||
| 424 | 424 | ); |
| 425 | 425 | }); |
| 426 | 426 | |
| 427 | - $this->registerService(\OCP\ICache::class, function ($c) { |
|
| 427 | + $this->registerService(\OCP\ICache::class, function($c) { |
|
| 428 | 428 | return new Cache\File(); |
| 429 | 429 | }); |
| 430 | 430 | $this->registerAlias('UserCache', \OCP\ICache::class); |
| 431 | 431 | |
| 432 | - $this->registerService(Factory::class, function (Server $c) { |
|
| 432 | + $this->registerService(Factory::class, function(Server $c) { |
|
| 433 | 433 | $config = $c->getConfig(); |
| 434 | 434 | |
| 435 | 435 | if ($config->getSystemValue('installed', false) && !(defined('PHPUNIT_RUN') && PHPUNIT_RUN)) { |
| 436 | 436 | $v = \OC_App::getAppVersions(); |
| 437 | - $v['core'] = md5(file_get_contents(\OC::$SERVERROOT . '/version.php')); |
|
| 437 | + $v['core'] = md5(file_get_contents(\OC::$SERVERROOT.'/version.php')); |
|
| 438 | 438 | $version = implode(',', $v); |
| 439 | 439 | $instanceId = \OC_Util::getInstanceId(); |
| 440 | 440 | $path = \OC::$SERVERROOT; |
| 441 | - $prefix = md5($instanceId . '-' . $version . '-' . $path . '-' . \OC::$WEBROOT); |
|
| 441 | + $prefix = md5($instanceId.'-'.$version.'-'.$path.'-'.\OC::$WEBROOT); |
|
| 442 | 442 | return new \OC\Memcache\Factory($prefix, $c->getLogger(), |
| 443 | 443 | $config->getSystemValue('memcache.local', null), |
| 444 | 444 | $config->getSystemValue('memcache.distributed', null), |
@@ -455,12 +455,12 @@ discard block |
||
| 455 | 455 | $this->registerAlias('MemCacheFactory', Factory::class); |
| 456 | 456 | $this->registerAlias(ICacheFactory::class, Factory::class); |
| 457 | 457 | |
| 458 | - $this->registerService('RedisFactory', function (Server $c) { |
|
| 458 | + $this->registerService('RedisFactory', function(Server $c) { |
|
| 459 | 459 | $systemConfig = $c->getSystemConfig(); |
| 460 | 460 | return new RedisFactory($systemConfig); |
| 461 | 461 | }); |
| 462 | 462 | |
| 463 | - $this->registerService(\OCP\Activity\IManager::class, function (Server $c) { |
|
| 463 | + $this->registerService(\OCP\Activity\IManager::class, function(Server $c) { |
|
| 464 | 464 | return new \OC\Activity\Manager( |
| 465 | 465 | $c->getRequest(), |
| 466 | 466 | $c->getUserSession(), |
@@ -470,14 +470,14 @@ discard block |
||
| 470 | 470 | }); |
| 471 | 471 | $this->registerAlias('ActivityManager', \OCP\Activity\IManager::class); |
| 472 | 472 | |
| 473 | - $this->registerService(\OCP\Activity\IEventMerger::class, function (Server $c) { |
|
| 473 | + $this->registerService(\OCP\Activity\IEventMerger::class, function(Server $c) { |
|
| 474 | 474 | return new \OC\Activity\EventMerger( |
| 475 | 475 | $c->getL10N('lib') |
| 476 | 476 | ); |
| 477 | 477 | }); |
| 478 | 478 | $this->registerAlias(IValidator::class, Validator::class); |
| 479 | 479 | |
| 480 | - $this->registerService(\OCP\IAvatarManager::class, function (Server $c) { |
|
| 480 | + $this->registerService(\OCP\IAvatarManager::class, function(Server $c) { |
|
| 481 | 481 | return new AvatarManager( |
| 482 | 482 | $c->getUserManager(), |
| 483 | 483 | $c->getAppDataDir('avatar'), |
@@ -488,7 +488,7 @@ discard block |
||
| 488 | 488 | }); |
| 489 | 489 | $this->registerAlias('AvatarManager', \OCP\IAvatarManager::class); |
| 490 | 490 | |
| 491 | - $this->registerService(\OCP\ILogger::class, function (Server $c) { |
|
| 491 | + $this->registerService(\OCP\ILogger::class, function(Server $c) { |
|
| 492 | 492 | $logType = $c->query('AllConfig')->getSystemValue('log_type', 'file'); |
| 493 | 493 | $logger = Log::getLogClass($logType); |
| 494 | 494 | call_user_func(array($logger, 'init')); |
@@ -497,7 +497,7 @@ discard block |
||
| 497 | 497 | }); |
| 498 | 498 | $this->registerAlias('Logger', \OCP\ILogger::class); |
| 499 | 499 | |
| 500 | - $this->registerService(\OCP\BackgroundJob\IJobList::class, function (Server $c) { |
|
| 500 | + $this->registerService(\OCP\BackgroundJob\IJobList::class, function(Server $c) { |
|
| 501 | 501 | $config = $c->getConfig(); |
| 502 | 502 | return new \OC\BackgroundJob\JobList( |
| 503 | 503 | $c->getDatabaseConnection(), |
@@ -507,7 +507,7 @@ discard block |
||
| 507 | 507 | }); |
| 508 | 508 | $this->registerAlias('JobList', \OCP\BackgroundJob\IJobList::class); |
| 509 | 509 | |
| 510 | - $this->registerService(\OCP\Route\IRouter::class, function (Server $c) { |
|
| 510 | + $this->registerService(\OCP\Route\IRouter::class, function(Server $c) { |
|
| 511 | 511 | $cacheFactory = $c->getMemCacheFactory(); |
| 512 | 512 | $logger = $c->getLogger(); |
| 513 | 513 | if ($cacheFactory->isAvailable()) { |
@@ -519,32 +519,32 @@ discard block |
||
| 519 | 519 | }); |
| 520 | 520 | $this->registerAlias('Router', \OCP\Route\IRouter::class); |
| 521 | 521 | |
| 522 | - $this->registerService(\OCP\ISearch::class, function ($c) { |
|
| 522 | + $this->registerService(\OCP\ISearch::class, function($c) { |
|
| 523 | 523 | return new Search(); |
| 524 | 524 | }); |
| 525 | 525 | $this->registerAlias('Search', \OCP\ISearch::class); |
| 526 | 526 | |
| 527 | - $this->registerService(\OCP\Security\ISecureRandom::class, function ($c) { |
|
| 527 | + $this->registerService(\OCP\Security\ISecureRandom::class, function($c) { |
|
| 528 | 528 | return new SecureRandom(); |
| 529 | 529 | }); |
| 530 | 530 | $this->registerAlias('SecureRandom', \OCP\Security\ISecureRandom::class); |
| 531 | 531 | |
| 532 | - $this->registerService(\OCP\Security\ICrypto::class, function (Server $c) { |
|
| 532 | + $this->registerService(\OCP\Security\ICrypto::class, function(Server $c) { |
|
| 533 | 533 | return new Crypto($c->getConfig(), $c->getSecureRandom()); |
| 534 | 534 | }); |
| 535 | 535 | $this->registerAlias('Crypto', \OCP\Security\ICrypto::class); |
| 536 | 536 | |
| 537 | - $this->registerService(\OCP\Security\IHasher::class, function (Server $c) { |
|
| 537 | + $this->registerService(\OCP\Security\IHasher::class, function(Server $c) { |
|
| 538 | 538 | return new Hasher($c->getConfig()); |
| 539 | 539 | }); |
| 540 | 540 | $this->registerAlias('Hasher', \OCP\Security\IHasher::class); |
| 541 | 541 | |
| 542 | - $this->registerService(\OCP\Security\ICredentialsManager::class, function (Server $c) { |
|
| 542 | + $this->registerService(\OCP\Security\ICredentialsManager::class, function(Server $c) { |
|
| 543 | 543 | return new CredentialsManager($c->getCrypto(), $c->getDatabaseConnection()); |
| 544 | 544 | }); |
| 545 | 545 | $this->registerAlias('CredentialsManager', \OCP\Security\ICredentialsManager::class); |
| 546 | 546 | |
| 547 | - $this->registerService(IDBConnection::class, function (Server $c) { |
|
| 547 | + $this->registerService(IDBConnection::class, function(Server $c) { |
|
| 548 | 548 | $systemConfig = $c->getSystemConfig(); |
| 549 | 549 | $factory = new \OC\DB\ConnectionFactory($systemConfig); |
| 550 | 550 | $type = $systemConfig->getValue('dbtype', 'sqlite'); |
@@ -558,7 +558,7 @@ discard block |
||
| 558 | 558 | }); |
| 559 | 559 | $this->registerAlias('DatabaseConnection', IDBConnection::class); |
| 560 | 560 | |
| 561 | - $this->registerService('HTTPHelper', function (Server $c) { |
|
| 561 | + $this->registerService('HTTPHelper', function(Server $c) { |
|
| 562 | 562 | $config = $c->getConfig(); |
| 563 | 563 | return new HTTPHelper( |
| 564 | 564 | $config, |
@@ -566,7 +566,7 @@ discard block |
||
| 566 | 566 | ); |
| 567 | 567 | }); |
| 568 | 568 | |
| 569 | - $this->registerService(\OCP\Http\Client\IClientService::class, function (Server $c) { |
|
| 569 | + $this->registerService(\OCP\Http\Client\IClientService::class, function(Server $c) { |
|
| 570 | 570 | $user = \OC_User::getUser(); |
| 571 | 571 | $uid = $user ? $user : null; |
| 572 | 572 | return new ClientService( |
@@ -576,7 +576,7 @@ discard block |
||
| 576 | 576 | }); |
| 577 | 577 | $this->registerAlias('HttpClientService', \OCP\Http\Client\IClientService::class); |
| 578 | 578 | |
| 579 | - $this->registerService(\OCP\Diagnostics\IEventLogger::class, function (Server $c) { |
|
| 579 | + $this->registerService(\OCP\Diagnostics\IEventLogger::class, function(Server $c) { |
|
| 580 | 580 | if ($c->getSystemConfig()->getValue('debug', false)) { |
| 581 | 581 | return new EventLogger(); |
| 582 | 582 | } else { |
@@ -585,7 +585,7 @@ discard block |
||
| 585 | 585 | }); |
| 586 | 586 | $this->registerAlias('EventLogger', \OCP\Diagnostics\IEventLogger::class); |
| 587 | 587 | |
| 588 | - $this->registerService(\OCP\Diagnostics\IQueryLogger::class, function (Server $c) { |
|
| 588 | + $this->registerService(\OCP\Diagnostics\IQueryLogger::class, function(Server $c) { |
|
| 589 | 589 | if ($c->getSystemConfig()->getValue('debug', false)) { |
| 590 | 590 | return new QueryLogger(); |
| 591 | 591 | } else { |
@@ -594,7 +594,7 @@ discard block |
||
| 594 | 594 | }); |
| 595 | 595 | $this->registerAlias('QueryLogger', \OCP\Diagnostics\IQueryLogger::class); |
| 596 | 596 | |
| 597 | - $this->registerService(TempManager::class, function (Server $c) { |
|
| 597 | + $this->registerService(TempManager::class, function(Server $c) { |
|
| 598 | 598 | return new TempManager( |
| 599 | 599 | $c->getLogger(), |
| 600 | 600 | $c->getConfig() |
@@ -603,7 +603,7 @@ discard block |
||
| 603 | 603 | $this->registerAlias('TempManager', TempManager::class); |
| 604 | 604 | $this->registerAlias(ITempManager::class, TempManager::class); |
| 605 | 605 | |
| 606 | - $this->registerService(AppManager::class, function (Server $c) { |
|
| 606 | + $this->registerService(AppManager::class, function(Server $c) { |
|
| 607 | 607 | return new \OC\App\AppManager( |
| 608 | 608 | $c->getUserSession(), |
| 609 | 609 | $c->getAppConfig(), |
@@ -615,7 +615,7 @@ discard block |
||
| 615 | 615 | $this->registerAlias('AppManager', AppManager::class); |
| 616 | 616 | $this->registerAlias(IAppManager::class, AppManager::class); |
| 617 | 617 | |
| 618 | - $this->registerService(\OCP\IDateTimeZone::class, function (Server $c) { |
|
| 618 | + $this->registerService(\OCP\IDateTimeZone::class, function(Server $c) { |
|
| 619 | 619 | return new DateTimeZone( |
| 620 | 620 | $c->getConfig(), |
| 621 | 621 | $c->getSession() |
@@ -623,7 +623,7 @@ discard block |
||
| 623 | 623 | }); |
| 624 | 624 | $this->registerAlias('DateTimeZone', \OCP\IDateTimeZone::class); |
| 625 | 625 | |
| 626 | - $this->registerService(\OCP\IDateTimeFormatter::class, function (Server $c) { |
|
| 626 | + $this->registerService(\OCP\IDateTimeFormatter::class, function(Server $c) { |
|
| 627 | 627 | $language = $c->getConfig()->getUserValue($c->getSession()->get('user_id'), 'core', 'lang', null); |
| 628 | 628 | |
| 629 | 629 | return new DateTimeFormatter( |
@@ -633,7 +633,7 @@ discard block |
||
| 633 | 633 | }); |
| 634 | 634 | $this->registerAlias('DateTimeFormatter', \OCP\IDateTimeFormatter::class); |
| 635 | 635 | |
| 636 | - $this->registerService(\OCP\Files\Config\IUserMountCache::class, function (Server $c) { |
|
| 636 | + $this->registerService(\OCP\Files\Config\IUserMountCache::class, function(Server $c) { |
|
| 637 | 637 | $mountCache = new UserMountCache($c->getDatabaseConnection(), $c->getUserManager(), $c->getLogger()); |
| 638 | 638 | $listener = new UserMountCacheListener($mountCache); |
| 639 | 639 | $listener->listen($c->getUserManager()); |
@@ -641,10 +641,10 @@ discard block |
||
| 641 | 641 | }); |
| 642 | 642 | $this->registerAlias('UserMountCache', \OCP\Files\Config\IUserMountCache::class); |
| 643 | 643 | |
| 644 | - $this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function (Server $c) { |
|
| 644 | + $this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function(Server $c) { |
|
| 645 | 645 | $loader = \OC\Files\Filesystem::getLoader(); |
| 646 | 646 | $mountCache = $c->query('UserMountCache'); |
| 647 | - $manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache); |
|
| 647 | + $manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache); |
|
| 648 | 648 | |
| 649 | 649 | // builtin providers |
| 650 | 650 | |
@@ -657,14 +657,14 @@ discard block |
||
| 657 | 657 | }); |
| 658 | 658 | $this->registerAlias('MountConfigManager', \OCP\Files\Config\IMountProviderCollection::class); |
| 659 | 659 | |
| 660 | - $this->registerService('IniWrapper', function ($c) { |
|
| 660 | + $this->registerService('IniWrapper', function($c) { |
|
| 661 | 661 | return new IniGetWrapper(); |
| 662 | 662 | }); |
| 663 | - $this->registerService('AsyncCommandBus', function (Server $c) { |
|
| 663 | + $this->registerService('AsyncCommandBus', function(Server $c) { |
|
| 664 | 664 | $jobList = $c->getJobList(); |
| 665 | 665 | return new AsyncBus($jobList); |
| 666 | 666 | }); |
| 667 | - $this->registerService('TrustedDomainHelper', function ($c) { |
|
| 667 | + $this->registerService('TrustedDomainHelper', function($c) { |
|
| 668 | 668 | return new TrustedDomainHelper($this->getConfig()); |
| 669 | 669 | }); |
| 670 | 670 | $this->registerService('Throttler', function(Server $c) { |
@@ -675,10 +675,10 @@ discard block |
||
| 675 | 675 | $c->getConfig() |
| 676 | 676 | ); |
| 677 | 677 | }); |
| 678 | - $this->registerService('IntegrityCodeChecker', function (Server $c) { |
|
| 678 | + $this->registerService('IntegrityCodeChecker', function(Server $c) { |
|
| 679 | 679 | // IConfig and IAppManager requires a working database. This code |
| 680 | 680 | // might however be called when ownCloud is not yet setup. |
| 681 | - if(\OC::$server->getSystemConfig()->getValue('installed', false)) { |
|
| 681 | + if (\OC::$server->getSystemConfig()->getValue('installed', false)) { |
|
| 682 | 682 | $config = $c->getConfig(); |
| 683 | 683 | $appManager = $c->getAppManager(); |
| 684 | 684 | } else { |
@@ -696,7 +696,7 @@ discard block |
||
| 696 | 696 | $c->getTempManager() |
| 697 | 697 | ); |
| 698 | 698 | }); |
| 699 | - $this->registerService(\OCP\IRequest::class, function ($c) { |
|
| 699 | + $this->registerService(\OCP\IRequest::class, function($c) { |
|
| 700 | 700 | if (isset($this['urlParams'])) { |
| 701 | 701 | $urlParams = $this['urlParams']; |
| 702 | 702 | } else { |
@@ -732,7 +732,7 @@ discard block |
||
| 732 | 732 | }); |
| 733 | 733 | $this->registerAlias('Request', \OCP\IRequest::class); |
| 734 | 734 | |
| 735 | - $this->registerService(\OCP\Mail\IMailer::class, function (Server $c) { |
|
| 735 | + $this->registerService(\OCP\Mail\IMailer::class, function(Server $c) { |
|
| 736 | 736 | return new Mailer( |
| 737 | 737 | $c->getConfig(), |
| 738 | 738 | $c->getLogger(), |
@@ -744,14 +744,14 @@ discard block |
||
| 744 | 744 | $this->registerService('LDAPProvider', function(Server $c) { |
| 745 | 745 | $config = $c->getConfig(); |
| 746 | 746 | $factoryClass = $config->getSystemValue('ldapProviderFactory', null); |
| 747 | - if(is_null($factoryClass)) { |
|
| 747 | + if (is_null($factoryClass)) { |
|
| 748 | 748 | throw new \Exception('ldapProviderFactory not set'); |
| 749 | 749 | } |
| 750 | 750 | /** @var \OCP\LDAP\ILDAPProviderFactory $factory */ |
| 751 | 751 | $factory = new $factoryClass($this); |
| 752 | 752 | return $factory->getLDAPProvider(); |
| 753 | 753 | }); |
| 754 | - $this->registerService('LockingProvider', function (Server $c) { |
|
| 754 | + $this->registerService('LockingProvider', function(Server $c) { |
|
| 755 | 755 | $ini = $c->getIniWrapper(); |
| 756 | 756 | $config = $c->getConfig(); |
| 757 | 757 | $ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time'))); |
@@ -767,37 +767,37 @@ discard block |
||
| 767 | 767 | return new NoopLockingProvider(); |
| 768 | 768 | }); |
| 769 | 769 | |
| 770 | - $this->registerService(\OCP\Files\Mount\IMountManager::class, function () { |
|
| 770 | + $this->registerService(\OCP\Files\Mount\IMountManager::class, function() { |
|
| 771 | 771 | return new \OC\Files\Mount\Manager(); |
| 772 | 772 | }); |
| 773 | 773 | $this->registerAlias('MountManager', \OCP\Files\Mount\IMountManager::class); |
| 774 | 774 | |
| 775 | - $this->registerService(\OCP\Files\IMimeTypeDetector::class, function (Server $c) { |
|
| 775 | + $this->registerService(\OCP\Files\IMimeTypeDetector::class, function(Server $c) { |
|
| 776 | 776 | return new \OC\Files\Type\Detection( |
| 777 | 777 | $c->getURLGenerator(), |
| 778 | 778 | \OC::$configDir, |
| 779 | - \OC::$SERVERROOT . '/resources/config/' |
|
| 779 | + \OC::$SERVERROOT.'/resources/config/' |
|
| 780 | 780 | ); |
| 781 | 781 | }); |
| 782 | 782 | $this->registerAlias('MimeTypeDetector', \OCP\Files\IMimeTypeDetector::class); |
| 783 | 783 | |
| 784 | - $this->registerService(\OCP\Files\IMimeTypeLoader::class, function (Server $c) { |
|
| 784 | + $this->registerService(\OCP\Files\IMimeTypeLoader::class, function(Server $c) { |
|
| 785 | 785 | return new \OC\Files\Type\Loader( |
| 786 | 786 | $c->getDatabaseConnection() |
| 787 | 787 | ); |
| 788 | 788 | }); |
| 789 | 789 | $this->registerAlias('MimeTypeLoader', \OCP\Files\IMimeTypeLoader::class); |
| 790 | 790 | |
| 791 | - $this->registerService(\OCP\Notification\IManager::class, function (Server $c) { |
|
| 791 | + $this->registerService(\OCP\Notification\IManager::class, function(Server $c) { |
|
| 792 | 792 | return new Manager( |
| 793 | 793 | $c->query(IValidator::class) |
| 794 | 794 | ); |
| 795 | 795 | }); |
| 796 | 796 | $this->registerAlias('NotificationManager', \OCP\Notification\IManager::class); |
| 797 | 797 | |
| 798 | - $this->registerService(\OC\CapabilitiesManager::class, function (Server $c) { |
|
| 798 | + $this->registerService(\OC\CapabilitiesManager::class, function(Server $c) { |
|
| 799 | 799 | $manager = new \OC\CapabilitiesManager($c->getLogger()); |
| 800 | - $manager->registerCapability(function () use ($c) { |
|
| 800 | + $manager->registerCapability(function() use ($c) { |
|
| 801 | 801 | return new \OC\OCS\CoreCapabilities($c->getConfig()); |
| 802 | 802 | }); |
| 803 | 803 | return $manager; |
@@ -854,13 +854,13 @@ discard block |
||
| 854 | 854 | |
| 855 | 855 | ); |
| 856 | 856 | }); |
| 857 | - $this->registerService(EventDispatcher::class, function () { |
|
| 857 | + $this->registerService(EventDispatcher::class, function() { |
|
| 858 | 858 | return new EventDispatcher(); |
| 859 | 859 | }); |
| 860 | 860 | $this->registerAlias('EventDispatcher', EventDispatcher::class); |
| 861 | 861 | $this->registerAlias(EventDispatcherInterface::class, EventDispatcher::class); |
| 862 | 862 | |
| 863 | - $this->registerService('CryptoWrapper', function (Server $c) { |
|
| 863 | + $this->registerService('CryptoWrapper', function(Server $c) { |
|
| 864 | 864 | // FIXME: Instantiiated here due to cyclic dependency |
| 865 | 865 | $request = new Request( |
| 866 | 866 | [ |
@@ -885,7 +885,7 @@ discard block |
||
| 885 | 885 | $request |
| 886 | 886 | ); |
| 887 | 887 | }); |
| 888 | - $this->registerService('CsrfTokenManager', function (Server $c) { |
|
| 888 | + $this->registerService('CsrfTokenManager', function(Server $c) { |
|
| 889 | 889 | $tokenGenerator = new CsrfTokenGenerator($c->getSecureRandom()); |
| 890 | 890 | |
| 891 | 891 | return new CsrfTokenManager( |
@@ -893,10 +893,10 @@ discard block |
||
| 893 | 893 | $c->query(SessionStorage::class) |
| 894 | 894 | ); |
| 895 | 895 | }); |
| 896 | - $this->registerService(SessionStorage::class, function (Server $c) { |
|
| 896 | + $this->registerService(SessionStorage::class, function(Server $c) { |
|
| 897 | 897 | return new SessionStorage($c->getSession()); |
| 898 | 898 | }); |
| 899 | - $this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function (Server $c) { |
|
| 899 | + $this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function(Server $c) { |
|
| 900 | 900 | return new ContentSecurityPolicyManager(); |
| 901 | 901 | }); |
| 902 | 902 | $this->registerAlias('ContentSecurityPolicyManager', \OCP\Security\IContentSecurityPolicyManager::class); |
@@ -947,23 +947,23 @@ discard block |
||
| 947 | 947 | ); |
| 948 | 948 | return $manager; |
| 949 | 949 | }); |
| 950 | - $this->registerService(\OC\Files\AppData\Factory::class, function (Server $c) { |
|
| 950 | + $this->registerService(\OC\Files\AppData\Factory::class, function(Server $c) { |
|
| 951 | 951 | return new \OC\Files\AppData\Factory( |
| 952 | 952 | $c->getRootFolder(), |
| 953 | 953 | $c->getSystemConfig() |
| 954 | 954 | ); |
| 955 | 955 | }); |
| 956 | 956 | |
| 957 | - $this->registerService('LockdownManager', function (Server $c) { |
|
| 957 | + $this->registerService('LockdownManager', function(Server $c) { |
|
| 958 | 958 | return new LockdownManager(); |
| 959 | 959 | }); |
| 960 | 960 | |
| 961 | - $this->registerService(ICloudIdManager::class, function (Server $c) { |
|
| 961 | + $this->registerService(ICloudIdManager::class, function(Server $c) { |
|
| 962 | 962 | return new CloudIdManager(); |
| 963 | 963 | }); |
| 964 | 964 | |
| 965 | 965 | /* To trick DI since we don't extend the DIContainer here */ |
| 966 | - $this->registerService(CleanPreviewsBackgroundJob::class, function (Server $c) { |
|
| 966 | + $this->registerService(CleanPreviewsBackgroundJob::class, function(Server $c) { |
|
| 967 | 967 | return new CleanPreviewsBackgroundJob( |
| 968 | 968 | $c->getRootFolder(), |
| 969 | 969 | $c->getLogger(), |
@@ -1117,7 +1117,7 @@ discard block |
||
| 1117 | 1117 | * @deprecated since 9.2.0 use IAppData |
| 1118 | 1118 | */ |
| 1119 | 1119 | public function getAppFolder() { |
| 1120 | - $dir = '/' . \OC_App::getCurrentApp(); |
|
| 1120 | + $dir = '/'.\OC_App::getCurrentApp(); |
|
| 1121 | 1121 | $root = $this->getRootFolder(); |
| 1122 | 1122 | if (!$root->nodeExists($dir)) { |
| 1123 | 1123 | $folder = $root->newFolder($dir); |
@@ -25,7 +25,6 @@ |
||
| 25 | 25 | use Leafo\ScssPhp\Exception\ParserException; |
| 26 | 26 | use Leafo\ScssPhp\Formatter\Crunched; |
| 27 | 27 | use Leafo\ScssPhp\Formatter\Expanded; |
| 28 | - |
|
| 29 | 28 | use OC\Files\AppData\Factory; |
| 30 | 29 | use OCP\Files\IAppData; |
| 31 | 30 | use OCP\Files\NotFoundException; |
@@ -90,24 +90,24 @@ discard block |
||
| 90 | 90 | * @return boolean |
| 91 | 91 | */ |
| 92 | 92 | public function process($root, $file, $app) { |
| 93 | - $path = explode('/', $root . '/' . $file); |
|
| 93 | + $path = explode('/', $root.'/'.$file); |
|
| 94 | 94 | |
| 95 | 95 | $fileNameSCSS = array_pop($path); |
| 96 | 96 | $fileNameCSS = str_replace('.scss', '.css', $fileNameSCSS); |
| 97 | 97 | |
| 98 | 98 | $path = implode('/', $path); |
| 99 | 99 | |
| 100 | - $webDir = substr($path, strlen($this->serverRoot)+1); |
|
| 100 | + $webDir = substr($path, strlen($this->serverRoot) + 1); |
|
| 101 | 101 | |
| 102 | 102 | try { |
| 103 | 103 | $folder = $this->appData->getFolder($app); |
| 104 | - } catch(NotFoundException $e) { |
|
| 104 | + } catch (NotFoundException $e) { |
|
| 105 | 105 | // creating css appdata folder |
| 106 | 106 | $folder = $this->appData->newFolder($app); |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | |
| 110 | - if(!$this->variablesChanged() && $this->isCached($fileNameCSS, $folder)) { |
|
| 110 | + if (!$this->variablesChanged() && $this->isCached($fileNameCSS, $folder)) { |
|
| 111 | 111 | return true; |
| 112 | 112 | } |
| 113 | 113 | return $this->cache($path, $fileNameCSS, $fileNameSCSS, $folder, $webDir); |
@@ -133,13 +133,13 @@ discard block |
||
| 133 | 133 | try { |
| 134 | 134 | $cachedFile = $folder->getFile($fileNameCSS); |
| 135 | 135 | if ($cachedFile->getSize() > 0) { |
| 136 | - $depFileName = $fileNameCSS . '.deps'; |
|
| 137 | - $deps = $this->depsCache->get($folder->getName() . '-' . $depFileName); |
|
| 136 | + $depFileName = $fileNameCSS.'.deps'; |
|
| 137 | + $deps = $this->depsCache->get($folder->getName().'-'.$depFileName); |
|
| 138 | 138 | if ($deps === null) { |
| 139 | 139 | $depFile = $folder->getFile($depFileName); |
| 140 | 140 | $deps = $depFile->getContent(); |
| 141 | 141 | //Set to memcache for next run |
| 142 | - $this->depsCache->set($folder->getName() . '-' . $depFileName, $deps); |
|
| 142 | + $this->depsCache->set($folder->getName().'-'.$depFileName, $deps); |
|
| 143 | 143 | } |
| 144 | 144 | $deps = json_decode($deps, true); |
| 145 | 145 | |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | } |
| 151 | 151 | } |
| 152 | 152 | return true; |
| 153 | - } catch(NotFoundException $e) { |
|
| 153 | + } catch (NotFoundException $e) { |
|
| 154 | 154 | return false; |
| 155 | 155 | } |
| 156 | 156 | } |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | */ |
| 162 | 162 | private function variablesChanged() { |
| 163 | 163 | $injectedVariables = $this->getInjectedVariables(); |
| 164 | - if($this->config->getAppValue('core', 'scss.variables') !== md5($injectedVariables)) { |
|
| 164 | + if ($this->config->getAppValue('core', 'scss.variables') !== md5($injectedVariables)) { |
|
| 165 | 165 | $this->resetCache(); |
| 166 | 166 | $this->config->setAppValue('core', 'scss.variables', md5($injectedVariables)); |
| 167 | 167 | return true; |
@@ -182,9 +182,9 @@ discard block |
||
| 182 | 182 | $scss = new Compiler(); |
| 183 | 183 | $scss->setImportPaths([ |
| 184 | 184 | $path, |
| 185 | - \OC::$SERVERROOT . '/core/css/', |
|
| 185 | + \OC::$SERVERROOT.'/core/css/', |
|
| 186 | 186 | ]); |
| 187 | - if($this->config->getSystemValue('debug')) { |
|
| 187 | + if ($this->config->getSystemValue('debug')) { |
|
| 188 | 188 | // Debug mode |
| 189 | 189 | $scss->setFormatter(Expanded::class); |
| 190 | 190 | $scss->setLineNumberStyle(Compiler::LINE_COMMENTS); |
@@ -195,11 +195,11 @@ discard block |
||
| 195 | 195 | |
| 196 | 196 | try { |
| 197 | 197 | $cachedfile = $folder->getFile($fileNameCSS); |
| 198 | - } catch(NotFoundException $e) { |
|
| 198 | + } catch (NotFoundException $e) { |
|
| 199 | 199 | $cachedfile = $folder->newFile($fileNameCSS); |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | - $depFileName = $fileNameCSS . '.deps'; |
|
| 202 | + $depFileName = $fileNameCSS.'.deps'; |
|
| 203 | 203 | try { |
| 204 | 204 | $depFile = $folder->getFile($depFileName); |
| 205 | 205 | } catch (NotFoundException $e) { |
@@ -209,10 +209,10 @@ discard block |
||
| 209 | 209 | // Compile |
| 210 | 210 | try { |
| 211 | 211 | $compiledScss = $scss->compile( |
| 212 | - '@import "variables.scss";' . |
|
| 213 | - $this->getInjectedVariables() . |
|
| 212 | + '@import "variables.scss";'. |
|
| 213 | + $this->getInjectedVariables(). |
|
| 214 | 214 | '@import "'.$fileNameSCSS.'";'); |
| 215 | - } catch(ParserException $e) { |
|
| 215 | + } catch (ParserException $e) { |
|
| 216 | 216 | $this->logger->error($e, ['app' => 'core']); |
| 217 | 217 | return false; |
| 218 | 218 | } |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | $depFile->putContent(json_encode($scss->getParsedFiles())); |
| 223 | 223 | $this->logger->debug($webDir.'/'.$fileNameSCSS.' compiled and successfully cached', ['app' => 'core']); |
| 224 | 224 | return true; |
| 225 | - } catch(NotPermittedException $e) { |
|
| 225 | + } catch (NotPermittedException $e) { |
|
| 226 | 226 | return false; |
| 227 | 227 | } |
| 228 | 228 | } |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | */ |
| 234 | 234 | private function resetCache() { |
| 235 | 235 | $appDirectory = $this->appData->getDirectoryListing(); |
| 236 | - if(empty($appDirectory)){ |
|
| 236 | + if (empty($appDirectory)) { |
|
| 237 | 237 | return; |
| 238 | 238 | } |
| 239 | 239 | foreach ($appDirectory as $folder) { |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | private function getInjectedVariables() { |
| 252 | 252 | $variables = ''; |
| 253 | 253 | foreach ($this->defaults->getScssVariables() as $key => $value) { |
| 254 | - $variables .= '$' . $key . ': ' . $value . ';'; |
|
| 254 | + $variables .= '$'.$key.': '.$value.';'; |
|
| 255 | 255 | } |
| 256 | 256 | return $variables; |
| 257 | 257 | } |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | private function rebaseUrls($css, $webDir) { |
| 266 | 266 | $re = '/url\([\'"]([\.\w?=\/-]*)[\'"]\)/x'; |
| 267 | 267 | // OC\Route\Router:75 |
| 268 | - if(($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true')) { |
|
| 268 | + if (($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true')) { |
|
| 269 | 269 | $subst = 'url(\'../../'.$webDir.'/$1\')'; |
| 270 | 270 | } else { |
| 271 | 271 | $subst = 'url(\'../../../'.$webDir.'/$1\')'; |
@@ -51,46 +51,46 @@ discard block |
||
| 51 | 51 | * @param string $renderAs |
| 52 | 52 | * @param string $appId application id |
| 53 | 53 | */ |
| 54 | - public function __construct( $renderAs, $appId = '' ) { |
|
| 54 | + public function __construct($renderAs, $appId = '') { |
|
| 55 | 55 | |
| 56 | 56 | // yes - should be injected .... |
| 57 | 57 | $this->config = \OC::$server->getConfig(); |
| 58 | 58 | |
| 59 | 59 | |
| 60 | 60 | // Decide which page we show |
| 61 | - if($renderAs == 'user') { |
|
| 62 | - parent::__construct( 'core', 'layout.user' ); |
|
| 63 | - if(in_array(\OC_App::getCurrentApp(), ['settings','admin', 'help']) !== false) { |
|
| 61 | + if ($renderAs == 'user') { |
|
| 62 | + parent::__construct('core', 'layout.user'); |
|
| 63 | + if (in_array(\OC_App::getCurrentApp(), ['settings', 'admin', 'help']) !== false) { |
|
| 64 | 64 | $this->assign('bodyid', 'body-settings'); |
| 65 | - }else{ |
|
| 65 | + } else { |
|
| 66 | 66 | $this->assign('bodyid', 'body-user'); |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | // Code integrity notification |
| 70 | 70 | $integrityChecker = \OC::$server->getIntegrityCodeChecker(); |
| 71 | - if(\OC_User::isAdminUser(\OC_User::getUser()) && $integrityChecker->isCodeCheckEnforced() && !$integrityChecker->hasPassedCheck()) { |
|
| 71 | + if (\OC_User::isAdminUser(\OC_User::getUser()) && $integrityChecker->isCodeCheckEnforced() && !$integrityChecker->hasPassedCheck()) { |
|
| 72 | 72 | \OCP\Util::addScript('core', 'integritycheck-failed-notification'); |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | // Add navigation entry |
| 76 | - $this->assign( 'application', ''); |
|
| 77 | - $this->assign( 'appid', $appId ); |
|
| 76 | + $this->assign('application', ''); |
|
| 77 | + $this->assign('appid', $appId); |
|
| 78 | 78 | $navigation = \OC_App::getNavigation(); |
| 79 | - $this->assign( 'navigation', $navigation); |
|
| 79 | + $this->assign('navigation', $navigation); |
|
| 80 | 80 | $navigation = \OC_App::getHeaderNavigation(); |
| 81 | - $this->assign( 'headernavigation', $navigation); |
|
| 81 | + $this->assign('headernavigation', $navigation); |
|
| 82 | 82 | $settingsNavigation = \OC_App::getSettingsNavigation(); |
| 83 | - $this->assign( 'settingsnavigation', $settingsNavigation); |
|
| 84 | - foreach($navigation as $entry) { |
|
| 83 | + $this->assign('settingsnavigation', $settingsNavigation); |
|
| 84 | + foreach ($navigation as $entry) { |
|
| 85 | 85 | if ($entry['active']) { |
| 86 | - $this->assign( 'application', $entry['name'] ); |
|
| 86 | + $this->assign('application', $entry['name']); |
|
| 87 | 87 | break; |
| 88 | 88 | } |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | - foreach($settingsNavigation as $entry) { |
|
| 91 | + foreach ($settingsNavigation as $entry) { |
|
| 92 | 92 | if ($entry['active']) { |
| 93 | - $this->assign( 'application', $entry['name'] ); |
|
| 93 | + $this->assign('application', $entry['name']); |
|
| 94 | 94 | break; |
| 95 | 95 | } |
| 96 | 96 | } |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | // Send the language to our layouts |
| 125 | 125 | $this->assign('language', \OC::$server->getL10NFactory()->findLanguage()); |
| 126 | 126 | |
| 127 | - if(\OC::$server->getSystemConfig()->getValue('installed', false)) { |
|
| 127 | + if (\OC::$server->getSystemConfig()->getValue('installed', false)) { |
|
| 128 | 128 | if (empty(self::$versionHash)) { |
| 129 | 129 | $v = \OC_App::getAppVersions(); |
| 130 | 130 | $v['core'] = implode('.', \OCP\Util::getVersion()); |
@@ -155,10 +155,10 @@ discard block |
||
| 155 | 155 | $this->append('jsfiles', \OC::$server->getURLGenerator()->linkToRoute('core.OCJS.getConfig', ['v' => self::$versionHash])); |
| 156 | 156 | } |
| 157 | 157 | } |
| 158 | - foreach($jsFiles as $info) { |
|
| 158 | + foreach ($jsFiles as $info) { |
|
| 159 | 159 | $web = $info[1]; |
| 160 | 160 | $file = $info[2]; |
| 161 | - $this->append( 'jsfiles', $web.'/'.$file . $this->getVersionHashSuffix() ); |
|
| 161 | + $this->append('jsfiles', $web.'/'.$file.$this->getVersionHashSuffix()); |
|
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | try { |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | |
| 170 | 170 | // Do not initialise scss appdata until we have a fully installed instance |
| 171 | 171 | // Do not load scss for update, errors, installation or login page |
| 172 | - if(\OC::$server->getSystemConfig()->getValue('installed', false) |
|
| 172 | + if (\OC::$server->getSystemConfig()->getValue('installed', false) |
|
| 173 | 173 | && !\OCP\Util::needUpgrade() |
| 174 | 174 | && $pathInfo !== '' |
| 175 | 175 | && !preg_match('/^\/login/', $pathInfo)) { |
@@ -184,25 +184,25 @@ discard block |
||
| 184 | 184 | $this->assign('cssfiles', array()); |
| 185 | 185 | $this->assign('printcssfiles', []); |
| 186 | 186 | $this->assign('versionHash', self::$versionHash); |
| 187 | - foreach($cssFiles as $info) { |
|
| 187 | + foreach ($cssFiles as $info) { |
|
| 188 | 188 | $web = $info[1]; |
| 189 | 189 | $file = $info[2]; |
| 190 | 190 | |
| 191 | 191 | if (substr($file, -strlen('print.css')) === 'print.css') { |
| 192 | - $this->append( 'printcssfiles', $web.'/'.$file . $this->getVersionHashSuffix() ); |
|
| 192 | + $this->append('printcssfiles', $web.'/'.$file.$this->getVersionHashSuffix()); |
|
| 193 | 193 | } else { |
| 194 | - $this->append( 'cssfiles', $web.'/'.$file . $this->getVersionHashSuffix() ); |
|
| 194 | + $this->append('cssfiles', $web.'/'.$file.$this->getVersionHashSuffix()); |
|
| 195 | 195 | } |
| 196 | 196 | } |
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | protected function getVersionHashSuffix() { |
| 200 | - if(\OC::$server->getConfig()->getSystemValue('debug', false)) { |
|
| 200 | + if (\OC::$server->getConfig()->getSystemValue('debug', false)) { |
|
| 201 | 201 | // allows chrome workspace mapping in debug mode |
| 202 | 202 | return ""; |
| 203 | 203 | } |
| 204 | 204 | |
| 205 | - return '?v=' . self::$versionHash; |
|
| 205 | + return '?v='.self::$versionHash; |
|
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | /** |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | // Read the selected theme from the config file |
| 214 | 214 | $theme = \OC_Util::getTheme(); |
| 215 | 215 | |
| 216 | - if($compileScss) { |
|
| 216 | + if ($compileScss) { |
|
| 217 | 217 | $SCSSCacher = \OC::$server->query(SCSSCacher::class); |
| 218 | 218 | } else { |
| 219 | 219 | $SCSSCacher = null; |
@@ -222,8 +222,8 @@ discard block |
||
| 222 | 222 | $locator = new \OC\Template\CSSResourceLocator( |
| 223 | 223 | \OC::$server->getLogger(), |
| 224 | 224 | $theme, |
| 225 | - array( \OC::$SERVERROOT => \OC::$WEBROOT ), |
|
| 226 | - array( \OC::$SERVERROOT => \OC::$WEBROOT ), |
|
| 225 | + array(\OC::$SERVERROOT => \OC::$WEBROOT), |
|
| 226 | + array(\OC::$SERVERROOT => \OC::$WEBROOT), |
|
| 227 | 227 | $SCSSCacher |
| 228 | 228 | ); |
| 229 | 229 | $locator->find($styles); |
@@ -241,8 +241,8 @@ discard block |
||
| 241 | 241 | $locator = new \OC\Template\JSResourceLocator( |
| 242 | 242 | \OC::$server->getLogger(), |
| 243 | 243 | $theme, |
| 244 | - array( \OC::$SERVERROOT => \OC::$WEBROOT ), |
|
| 245 | - array( \OC::$SERVERROOT => \OC::$WEBROOT )); |
|
| 244 | + array(\OC::$SERVERROOT => \OC::$WEBROOT), |
|
| 245 | + array(\OC::$SERVERROOT => \OC::$WEBROOT)); |
|
| 246 | 246 | $locator->find($scripts); |
| 247 | 247 | return $locator->getResources(); |
| 248 | 248 | } |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | */ |
| 256 | 256 | public static function convertToRelativePath($filePath) { |
| 257 | 257 | $relativePath = explode(\OC::$SERVERROOT, $filePath); |
| 258 | - if(count($relativePath) !== 2) { |
|
| 258 | + if (count($relativePath) !== 2) { |
|
| 259 | 259 | throw new \Exception('$filePath is not under the \OC::$SERVERROOT'); |
| 260 | 260 | } |
| 261 | 261 | |
@@ -333,8 +333,8 @@ discard block |
||
| 333 | 333 | * We cannot rely on automatic caching done by \OC_Util::addStyle, |
| 334 | 334 | * since we need to add the cacheBuster value to the url |
| 335 | 335 | */ |
| 336 | - $cssCached = $this->scssCacher->process(\OC::$SERVERROOT, $appPath . '/css/theming.scss', 'theming'); |
|
| 337 | - if(!$cssCached) { |
|
| 336 | + $cssCached = $this->scssCacher->process(\OC::$SERVERROOT, $appPath.'/css/theming.scss', 'theming'); |
|
| 337 | + if (!$cssCached) { |
|
| 338 | 338 | return new NotFoundResponse(); |
| 339 | 339 | } |
| 340 | 340 | |
@@ -363,12 +363,12 @@ discard block |
||
| 363 | 363 | $cacheBusterValue = $this->config->getAppValue('theming', 'cachebuster', '0'); |
| 364 | 364 | $responseJS = '(function() { |
| 365 | 365 | OCA.Theming = { |
| 366 | - name: ' . json_encode($this->themingDefaults->getName()) . ', |
|
| 367 | - url: ' . json_encode($this->themingDefaults->getBaseUrl()) . ', |
|
| 368 | - slogan: ' . json_encode($this->themingDefaults->getSlogan()) . ', |
|
| 369 | - color: ' . json_encode($this->themingDefaults->getMailHeaderColor()) . ', |
|
| 370 | - inverted: ' . json_encode($this->util->invertTextColor($this->themingDefaults->getMailHeaderColor())) . ', |
|
| 371 | - cacheBuster: ' . json_encode($cacheBusterValue) . ' |
|
| 366 | + name: ' . json_encode($this->themingDefaults->getName()).', |
|
| 367 | + url: ' . json_encode($this->themingDefaults->getBaseUrl()).', |
|
| 368 | + slogan: ' . json_encode($this->themingDefaults->getSlogan()).', |
|
| 369 | + color: ' . json_encode($this->themingDefaults->getMailHeaderColor()).', |
|
| 370 | + inverted: ' . json_encode($this->util->invertTextColor($this->themingDefaults->getMailHeaderColor())).', |
|
| 371 | + cacheBuster: ' . json_encode($cacheBusterValue).' |
|
| 372 | 372 | }; |
| 373 | 373 | })();'; |
| 374 | 374 | $response = new DataDownloadResponse($responseJS, 'javascript', 'text/javascript'); |
@@ -112,9 +112,9 @@ discard block |
||
| 112 | 112 | |
| 113 | 113 | public function getShortFooter() { |
| 114 | 114 | $slogan = $this->getSlogan(); |
| 115 | - $footer = '<a href="'. $this->getBaseUrl() . '" target="_blank"' . |
|
| 116 | - ' rel="noreferrer">' .$this->getEntity() . '</a>'. |
|
| 117 | - ($slogan !== '' ? ' – ' . $slogan : ''); |
|
| 115 | + $footer = '<a href="'.$this->getBaseUrl().'" target="_blank"'. |
|
| 116 | + ' rel="noreferrer">'.$this->getEntity().'</a>'. |
|
| 117 | + ($slogan !== '' ? ' – '.$slogan : ''); |
|
| 118 | 118 | |
| 119 | 119 | return $footer; |
| 120 | 120 | } |
@@ -140,8 +140,8 @@ discard block |
||
| 140 | 140 | $file = null; |
| 141 | 141 | } |
| 142 | 142 | $logo = $this->config->getAppValue('theming', 'logoMime', false); |
| 143 | - if(!$logo || $file === null) { |
|
| 144 | - return $this->urlGenerator->imagePath('core','logo.svg'); |
|
| 143 | + if (!$logo || $file === null) { |
|
| 144 | + return $this->urlGenerator->imagePath('core', 'logo.svg'); |
|
| 145 | 145 | } else { |
| 146 | 146 | return $this->urlGenerator->linkToRoute('theming.Theming.getLogo'); |
| 147 | 147 | } |
@@ -159,8 +159,8 @@ discard block |
||
| 159 | 159 | $file = null; |
| 160 | 160 | } |
| 161 | 161 | $backgroundLogo = $this->config->getAppValue('theming', 'backgroundMime', false); |
| 162 | - if(!$backgroundLogo || $file === null) { |
|
| 163 | - return $this->urlGenerator->imagePath('core','background.jpg'); |
|
| 162 | + if (!$backgroundLogo || $file === null) { |
|
| 163 | + return $this->urlGenerator->imagePath('core', 'background.jpg'); |
|
| 164 | 164 | } else { |
| 165 | 165 | return $this->urlGenerator->linkToRoute('theming.Theming.getLoginBackground'); |
| 166 | 166 | } |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | $variables = [ |
| 180 | - 'theming-cachebuster' => "'" . $this->config->getAppValue('theming', 'cachebuster', '0') . "'", |
|
| 180 | + 'theming-cachebuster' => "'".$this->config->getAppValue('theming', 'cachebuster', '0')."'", |
|
| 181 | 181 | ]; |
| 182 | 182 | |
| 183 | 183 | $variables['image-logo'] = "'../../".$this->getLogo()."'"; |
@@ -204,11 +204,11 @@ discard block |
||
| 204 | 204 | */ |
| 205 | 205 | public function shouldReplaceIcons() { |
| 206 | 206 | $cache = $this->cacheFactory->create('theming'); |
| 207 | - if($value = $cache->get('shouldReplaceIcons')) { |
|
| 208 | - return (bool)$value; |
|
| 207 | + if ($value = $cache->get('shouldReplaceIcons')) { |
|
| 208 | + return (bool) $value; |
|
| 209 | 209 | } |
| 210 | 210 | $value = false; |
| 211 | - if(extension_loaded('imagick')) { |
|
| 211 | + if (extension_loaded('imagick')) { |
|
| 212 | 212 | $checkImagick = new \Imagick(); |
| 213 | 213 | if (count($checkImagick->queryFormats('SVG')) >= 1) { |
| 214 | 214 | $value = true; |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | */ |
| 225 | 225 | private function increaseCacheBuster() { |
| 226 | 226 | $cacheBusterKey = $this->config->getAppValue('theming', 'cachebuster', '0'); |
| 227 | - $this->config->setAppValue('theming', 'cachebuster', (int)$cacheBusterKey+1); |
|
| 227 | + $this->config->setAppValue('theming', 'cachebuster', (int) $cacheBusterKey + 1); |
|
| 228 | 228 | $this->cacheFactory->create('theming')->clear('getScssVariables'); |
| 229 | 229 | } |
| 230 | 230 | |