@@ -144,9 +144,9 @@ discard block |
||
144 | 144 | |
145 | 145 | public function getShortFooter() { |
146 | 146 | $slogan = $this->getSlogan(); |
147 | - $footer = '<a href="'. $this->getBaseUrl() . '" target="_blank"' . |
|
148 | - ' rel="noreferrer noopener">' .$this->getEntity() . '</a>'. |
|
149 | - ($slogan !== '' ? ' – ' . $slogan : ''); |
|
147 | + $footer = '<a href="'.$this->getBaseUrl().'" target="_blank"'. |
|
148 | + ' rel="noreferrer noopener">'.$this->getEntity().'</a>'. |
|
149 | + ($slogan !== '' ? ' – '.$slogan : ''); |
|
150 | 150 | |
151 | 151 | return $footer; |
152 | 152 | } |
@@ -178,16 +178,16 @@ discard block |
||
178 | 178 | |
179 | 179 | $cacheBusterCounter = $this->config->getAppValue('theming', 'cachebuster', '0'); |
180 | 180 | |
181 | - if(!$logo || !$logoExists) { |
|
182 | - if($useSvg) { |
|
181 | + if (!$logo || !$logoExists) { |
|
182 | + if ($useSvg) { |
|
183 | 183 | $logo = $this->urlGenerator->imagePath('core', 'logo.svg'); |
184 | 184 | } else { |
185 | 185 | $logo = $this->urlGenerator->imagePath('core', 'logo.png'); |
186 | 186 | } |
187 | - return $logo . '?v=' . $cacheBusterCounter; |
|
187 | + return $logo.'?v='.$cacheBusterCounter; |
|
188 | 188 | } |
189 | 189 | |
190 | - return $this->urlGenerator->linkToRoute('theming.Theming.getLogo') . '?v=' . $cacheBusterCounter; |
|
190 | + return $this->urlGenerator->linkToRoute('theming.Theming.getLogo').'?v='.$cacheBusterCounter; |
|
191 | 191 | } |
192 | 192 | |
193 | 193 | /** |
@@ -198,11 +198,11 @@ discard block |
||
198 | 198 | public function getBackground() { |
199 | 199 | $cacheBusterCounter = $this->config->getAppValue('theming', 'cachebuster', '0'); |
200 | 200 | |
201 | - if($this->util->isBackgroundThemed()) { |
|
202 | - return $this->urlGenerator->linkToRoute('theming.Theming.getLoginBackground') . '?v=' . $cacheBusterCounter; |
|
201 | + if ($this->util->isBackgroundThemed()) { |
|
202 | + return $this->urlGenerator->linkToRoute('theming.Theming.getLoginBackground').'?v='.$cacheBusterCounter; |
|
203 | 203 | } |
204 | 204 | |
205 | - return $this->urlGenerator->imagePath('core','background.png') . '?v=' . $cacheBusterCounter; |
|
205 | + return $this->urlGenerator->imagePath('core', 'background.png').'?v='.$cacheBusterCounter; |
|
206 | 206 | } |
207 | 207 | |
208 | 208 | /** |
@@ -231,15 +231,15 @@ discard block |
||
231 | 231 | * @return array scss variables to overwrite |
232 | 232 | */ |
233 | 233 | public function getScssVariables() { |
234 | - $cache = $this->cacheFactory->createDistributed('theming-' . $this->urlGenerator->getBaseUrl()); |
|
234 | + $cache = $this->cacheFactory->createDistributed('theming-'.$this->urlGenerator->getBaseUrl()); |
|
235 | 235 | if ($value = $cache->get('getScssVariables')) { |
236 | 236 | return $value; |
237 | 237 | } |
238 | 238 | |
239 | 239 | $variables = [ |
240 | - 'theming-cachebuster' => "'" . $this->config->getAppValue('theming', 'cachebuster', '0') . "'", |
|
241 | - 'theming-logo-mime' => "'" . $this->config->getAppValue('theming', 'logoMime', '') . "'", |
|
242 | - 'theming-background-mime' => "'" . $this->config->getAppValue('theming', 'backgroundMime', '') . "'" |
|
240 | + 'theming-cachebuster' => "'".$this->config->getAppValue('theming', 'cachebuster', '0')."'", |
|
241 | + 'theming-logo-mime' => "'".$this->config->getAppValue('theming', 'logoMime', '')."'", |
|
242 | + 'theming-background-mime' => "'".$this->config->getAppValue('theming', 'backgroundMime', '')."'" |
|
243 | 243 | ]; |
244 | 244 | |
245 | 245 | $variables['image-logo'] = "'".$this->getLogo()."'"; |
@@ -268,25 +268,25 @@ discard block |
||
268 | 268 | * @return bool|string false if image should not replaced, otherwise the location of the image |
269 | 269 | */ |
270 | 270 | public function replaceImagePath($app, $image) { |
271 | - if($app==='') { |
|
271 | + if ($app === '') { |
|
272 | 272 | $app = 'core'; |
273 | 273 | } |
274 | 274 | $cacheBusterValue = $this->config->getAppValue('theming', 'cachebuster', '0'); |
275 | 275 | |
276 | 276 | if ($image === 'favicon.ico' && $this->shouldReplaceIcons()) { |
277 | - return $this->urlGenerator->linkToRoute('theming.Icon.getFavicon', ['app' => $app]) . '?v=' . $cacheBusterValue; |
|
277 | + return $this->urlGenerator->linkToRoute('theming.Icon.getFavicon', ['app' => $app]).'?v='.$cacheBusterValue; |
|
278 | 278 | } |
279 | 279 | if ($image === 'favicon-touch.png' && $this->shouldReplaceIcons()) { |
280 | - return $this->urlGenerator->linkToRoute('theming.Icon.getTouchIcon', ['app' => $app]) . '?v=' . $cacheBusterValue; |
|
280 | + return $this->urlGenerator->linkToRoute('theming.Icon.getTouchIcon', ['app' => $app]).'?v='.$cacheBusterValue; |
|
281 | 281 | } |
282 | 282 | if ($image === 'manifest.json') { |
283 | 283 | try { |
284 | 284 | $appPath = $this->appManager->getAppPath($app); |
285 | - if (file_exists($appPath . '/img/manifest.json')) { |
|
285 | + if (file_exists($appPath.'/img/manifest.json')) { |
|
286 | 286 | return false; |
287 | 287 | } |
288 | 288 | } catch (AppPathNotFoundException $e) {} |
289 | - return $this->urlGenerator->linkToRoute('theming.Theming.getManifest') . '?v=' . $cacheBusterValue; |
|
289 | + return $this->urlGenerator->linkToRoute('theming.Theming.getManifest').'?v='.$cacheBusterValue; |
|
290 | 290 | } |
291 | 291 | return false; |
292 | 292 | } |
@@ -298,12 +298,12 @@ discard block |
||
298 | 298 | * @return bool |
299 | 299 | */ |
300 | 300 | public function shouldReplaceIcons() { |
301 | - $cache = $this->cacheFactory->createDistributed('theming-' . $this->urlGenerator->getBaseUrl()); |
|
302 | - if($value = $cache->get('shouldReplaceIcons')) { |
|
303 | - return (bool)$value; |
|
301 | + $cache = $this->cacheFactory->createDistributed('theming-'.$this->urlGenerator->getBaseUrl()); |
|
302 | + if ($value = $cache->get('shouldReplaceIcons')) { |
|
303 | + return (bool) $value; |
|
304 | 304 | } |
305 | 305 | $value = false; |
306 | - if(extension_loaded('imagick')) { |
|
306 | + if (extension_loaded('imagick')) { |
|
307 | 307 | $checkImagick = new \Imagick(); |
308 | 308 | if (count($checkImagick->queryFormats('SVG')) >= 1) { |
309 | 309 | $value = true; |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | */ |
320 | 320 | private function increaseCacheBuster() { |
321 | 321 | $cacheBusterKey = $this->config->getAppValue('theming', 'cachebuster', '0'); |
322 | - $this->config->setAppValue('theming', 'cachebuster', (int)$cacheBusterKey+1); |
|
322 | + $this->config->setAppValue('theming', 'cachebuster', (int) $cacheBusterKey + 1); |
|
323 | 323 | $this->cacheFactory->createDistributed('theming-')->clear(); |
324 | 324 | } |
325 | 325 |