@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | $this->defaultLogoClaim = ''; |
| 66 | 66 | $this->defaultColorPrimary = '#0082c9'; |
| 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; |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | if ($this->themeExist('buildDocLinkToKey')) { |
| 270 | 270 | return $this->theme->buildDocLinkToKey($key); |
| 271 | 271 | } |
| 272 | - return $this->getDocBaseUrl() . '/server/' . $this->defaultDocVersion . '/go.php?to=' . $key; |
|
| 272 | + return $this->getDocBaseUrl().'/server/'.$this->defaultDocVersion.'/go.php?to='.$key; |
|
| 273 | 273 | } |
| 274 | 274 | |
| 275 | 275 | /** |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | * @return array scss variables to overwrite |
| 292 | 292 | */ |
| 293 | 293 | public function getScssVariables() { |
| 294 | - if($this->themeExist('getScssVariables')) { |
|
| 294 | + if ($this->themeExist('getScssVariables')) { |
|
| 295 | 295 | return $this->theme->getScssVariables(); |
| 296 | 296 | } |
| 297 | 297 | return []; |
@@ -312,11 +312,11 @@ discard block |
||
| 312 | 312 | return $this->theme->getLogo($useSvg); |
| 313 | 313 | } |
| 314 | 314 | |
| 315 | - if($useSvg) { |
|
| 315 | + if ($useSvg) { |
|
| 316 | 316 | $logo = \OC::$server->getURLGenerator()->imagePath('core', 'logo.svg'); |
| 317 | 317 | } else { |
| 318 | 318 | $logo = \OC::$server->getURLGenerator()->imagePath('core', 'logo.png'); |
| 319 | 319 | } |
| 320 | - return $logo . '?v=' . hash('sha1', implode('.', \OCP\Util::getVersion())); |
|
| 320 | + return $logo.'?v='.hash('sha1', implode('.', \OCP\Util::getVersion())); |
|
| 321 | 321 | } |
| 322 | 322 | } |
@@ -110,9 +110,9 @@ discard block |
||
| 110 | 110 | |
| 111 | 111 | public function getShortFooter() { |
| 112 | 112 | $slogan = $this->getSlogan(); |
| 113 | - $footer = '<a href="'. $this->getBaseUrl() . '" target="_blank"' . |
|
| 114 | - ' rel="noreferrer">' .$this->getEntity() . '</a>'. |
|
| 115 | - ($slogan !== '' ? ' – ' . $slogan : ''); |
|
| 113 | + $footer = '<a href="'.$this->getBaseUrl().'" target="_blank"'. |
|
| 114 | + ' rel="noreferrer">'.$this->getEntity().'</a>'. |
|
| 115 | + ($slogan !== '' ? ' – '.$slogan : ''); |
|
| 116 | 116 | |
| 117 | 117 | return $footer; |
| 118 | 118 | } |
@@ -144,16 +144,16 @@ discard block |
||
| 144 | 144 | |
| 145 | 145 | $cacheBusterCounter = $this->config->getAppValue('theming', 'cachebuster', '0'); |
| 146 | 146 | |
| 147 | - if(!$logo || !$logoExists) { |
|
| 148 | - if($useSvg) { |
|
| 147 | + if (!$logo || !$logoExists) { |
|
| 148 | + if ($useSvg) { |
|
| 149 | 149 | $logo = $this->urlGenerator->imagePath('core', 'logo.svg'); |
| 150 | 150 | } else { |
| 151 | 151 | $logo = $this->urlGenerator->imagePath('core', 'logo.png'); |
| 152 | 152 | } |
| 153 | - return $logo . '?v=' . $cacheBusterCounter; |
|
| 153 | + return $logo.'?v='.$cacheBusterCounter; |
|
| 154 | 154 | } |
| 155 | 155 | |
| 156 | - return $this->urlGenerator->linkToRoute('theming.Theming.getLogo') . '?v=' . $cacheBusterCounter; |
|
| 156 | + return $this->urlGenerator->linkToRoute('theming.Theming.getLogo').'?v='.$cacheBusterCounter; |
|
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | /** |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | * @return string |
| 163 | 163 | */ |
| 164 | 164 | public function getBackground() { |
| 165 | - $backgroundLogo = $this->config->getAppValue('theming', 'backgroundMime',false); |
|
| 165 | + $backgroundLogo = $this->config->getAppValue('theming', 'backgroundMime', false); |
|
| 166 | 166 | |
| 167 | 167 | $backgroundExists = true; |
| 168 | 168 | try { |
@@ -173,11 +173,11 @@ discard block |
||
| 173 | 173 | |
| 174 | 174 | $cacheBusterCounter = $this->config->getAppValue('theming', 'cachebuster', '0'); |
| 175 | 175 | |
| 176 | - if(!$backgroundLogo || !$backgroundExists) { |
|
| 177 | - return $this->urlGenerator->imagePath('core','background.jpg') . '?v=' . $cacheBusterCounter; |
|
| 176 | + if (!$backgroundLogo || !$backgroundExists) { |
|
| 177 | + return $this->urlGenerator->imagePath('core', 'background.jpg').'?v='.$cacheBusterCounter; |
|
| 178 | 178 | } |
| 179 | 179 | |
| 180 | - return $this->urlGenerator->linkToRoute('theming.Theming.getLoginBackground') . '?v=' . $cacheBusterCounter; |
|
| 180 | + return $this->urlGenerator->linkToRoute('theming.Theming.getLoginBackground').'?v='.$cacheBusterCounter; |
|
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | $variables = [ |
| 194 | - 'theming-cachebuster' => "'" . $this->config->getAppValue('theming', 'cachebuster', '0') . "'", |
|
| 194 | + 'theming-cachebuster' => "'".$this->config->getAppValue('theming', 'cachebuster', '0')."'", |
|
| 195 | 195 | ]; |
| 196 | 196 | |
| 197 | 197 | $variables['image-logo'] = "'".$this->urlGenerator->getAbsoluteURL($this->getLogo())."'"; |
@@ -223,11 +223,11 @@ discard block |
||
| 223 | 223 | */ |
| 224 | 224 | public function shouldReplaceIcons() { |
| 225 | 225 | $cache = $this->cacheFactory->create('theming'); |
| 226 | - if($value = $cache->get('shouldReplaceIcons')) { |
|
| 227 | - return (bool)$value; |
|
| 226 | + if ($value = $cache->get('shouldReplaceIcons')) { |
|
| 227 | + return (bool) $value; |
|
| 228 | 228 | } |
| 229 | 229 | $value = false; |
| 230 | - if(extension_loaded('imagick')) { |
|
| 230 | + if (extension_loaded('imagick')) { |
|
| 231 | 231 | $checkImagick = new \Imagick(); |
| 232 | 232 | if (count($checkImagick->queryFormats('SVG')) >= 1) { |
| 233 | 233 | $value = true; |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | */ |
| 244 | 244 | private function increaseCacheBuster() { |
| 245 | 245 | $cacheBusterKey = $this->config->getAppValue('theming', 'cachebuster', '0'); |
| 246 | - $this->config->setAppValue('theming', 'cachebuster', (int)$cacheBusterKey+1); |
|
| 246 | + $this->config->setAppValue('theming', 'cachebuster', (int) $cacheBusterKey + 1); |
|
| 247 | 247 | $this->cacheFactory->create('theming')->clear('getScssVariables'); |
| 248 | 248 | } |
| 249 | 249 | |