@@ -82,8 +82,7 @@ |
||
82 | 82 | 'color-element-dark' => $this->util->elementColor($color, false), |
83 | 83 | 'logo' => $this->url->getAbsoluteURL($this->theming->getLogo()), |
84 | 84 | 'background' => $backgroundLogo === 'backgroundColor' || ($backgroundLogo === false && $this->theming->getColorPrimary() !== '#0082c9') ? |
85 | - $this->theming->getColorPrimary() : |
|
86 | - $this->url->getAbsoluteURL($this->theming->getBackground()), |
|
85 | + $this->theming->getColorPrimary() : $this->url->getAbsoluteURL($this->theming->getBackground()), |
|
87 | 86 | 'background-plain' => $backgroundLogo === 'backgroundColor' || ($backgroundLogo === false && $this->theming->getColorPrimary() !== '#0082c9'), |
88 | 87 | 'background-default' => !$this->util->isBackgroundThemed(), |
89 | 88 | 'logoheader' => $this->url->getAbsoluteURL($this->theming->getLogo()), |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function invertTextColor($color) { |
68 | 68 | $l = $this->calculateLuma($color); |
69 | - if ($l>0.6) { |
|
69 | + if ($l > 0.6) { |
|
70 | 70 | return true; |
71 | 71 | } else { |
72 | 72 | return false; |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | list($red, $green, $blue) = $this->hexToRGB($color); |
105 | 105 | $compiler = new Compiler(); |
106 | 106 | $hsl = $compiler->toHSL($red, $green, $blue); |
107 | - return $hsl[3]/100; |
|
107 | + return $hsl[3] / 100; |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | /** |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | */ |
114 | 114 | public function calculateLuma($color) { |
115 | 115 | list($red, $green, $blue) = $this->hexToRGB($color); |
116 | - return (0.2126 * $red + 0.7152 * $green + 0.0722 * $blue) / 255; |
|
116 | + return (0.2126 * $red + 0.7152 * $green + 0.0722 * $blue) / 255; |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | /** |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | public function hexToRGB($color) { |
124 | 124 | $hex = preg_replace("/[^0-9A-Fa-f]/", '', $color); |
125 | 125 | if (strlen($hex) === 3) { |
126 | - $hex = $hex[0] . $hex[0] . $hex[1] . $hex[1] . $hex[2] . $hex[2]; |
|
126 | + $hex = $hex[0].$hex[0].$hex[1].$hex[1].$hex[2].$hex[2]; |
|
127 | 127 | } |
128 | 128 | if (strlen($hex) !== 6) { |
129 | 129 | return 0; |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | * @return string base64 encoded radio button svg |
141 | 141 | */ |
142 | 142 | public function generateRadioButton($color) { |
143 | - $radioButtonIcon = '<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">' . |
|
143 | + $radioButtonIcon = '<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">'. |
|
144 | 144 | '<path d="M8 1a7 7 0 0 0-7 7 7 7 0 0 0 7 7 7 7 0 0 0 7-7 7 7 0 0 0-7-7zm0 1a6 6 0 0 1 6 6 6 6 0 0 1-6 6 6 6 0 0 1-6-6 6 6 0 0 1 6-6zm0 2a4 4 0 1 0 0 8 4 4 0 0 0 0-8z" fill="'.$color.'"/></svg>'; |
145 | 145 | return base64_encode($radioButtonIcon); |
146 | 146 | } |
@@ -154,11 +154,11 @@ discard block |
||
154 | 154 | $app = str_replace(['\0', '/', '\\', '..'], '', $app); |
155 | 155 | try { |
156 | 156 | $appPath = $this->appManager->getAppPath($app); |
157 | - $icon = $appPath . '/img/' . $app . '.svg'; |
|
157 | + $icon = $appPath.'/img/'.$app.'.svg'; |
|
158 | 158 | if (file_exists($icon)) { |
159 | 159 | return $icon; |
160 | 160 | } |
161 | - $icon = $appPath . '/img/app.svg'; |
|
161 | + $icon = $appPath.'/img/app.svg'; |
|
162 | 162 | if (file_exists($icon)) { |
163 | 163 | return $icon; |
164 | 164 | } |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | } catch (NotFoundException $e) { |
176 | 176 | } |
177 | 177 | } |
178 | - return \OC::$SERVERROOT . '/core/img/logo/logo.svg'; |
|
178 | + return \OC::$SERVERROOT.'/core/img/logo/logo.svg'; |
|
179 | 179 | } |
180 | 180 | |
181 | 181 | /** |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | $app = str_replace(['\0', '/', '\\', '..'], '', $app); |
188 | 188 | $image = str_replace(['\0', '\\', '..'], '', $image); |
189 | 189 | if ($app === "core") { |
190 | - $icon = \OC::$SERVERROOT . '/core/img/' . $image; |
|
190 | + $icon = \OC::$SERVERROOT.'/core/img/'.$image; |
|
191 | 191 | if (file_exists($icon)) { |
192 | 192 | return $icon; |
193 | 193 | } |
@@ -199,23 +199,23 @@ discard block |
||
199 | 199 | return false; |
200 | 200 | } |
201 | 201 | |
202 | - $icon = $appPath . '/img/' . $image; |
|
202 | + $icon = $appPath.'/img/'.$image; |
|
203 | 203 | if (file_exists($icon)) { |
204 | 204 | return $icon; |
205 | 205 | } |
206 | - $icon = $appPath . '/img/' . $image . '.svg'; |
|
206 | + $icon = $appPath.'/img/'.$image.'.svg'; |
|
207 | 207 | if (file_exists($icon)) { |
208 | 208 | return $icon; |
209 | 209 | } |
210 | - $icon = $appPath . '/img/' . $image . '.png'; |
|
210 | + $icon = $appPath.'/img/'.$image.'.png'; |
|
211 | 211 | if (file_exists($icon)) { |
212 | 212 | return $icon; |
213 | 213 | } |
214 | - $icon = $appPath . '/img/' . $image . '.gif'; |
|
214 | + $icon = $appPath.'/img/'.$image.'.gif'; |
|
215 | 215 | if (file_exists($icon)) { |
216 | 216 | return $icon; |
217 | 217 | } |
218 | - $icon = $appPath . '/img/' . $image . '.jpg'; |
|
218 | + $icon = $appPath.'/img/'.$image.'.jpg'; |
|
219 | 219 | if (file_exists($icon)) { |
220 | 220 | return $icon; |
221 | 221 | } |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | } |
250 | 250 | |
251 | 251 | public function isBackgroundThemed() { |
252 | - $backgroundLogo = $this->config->getAppValue('theming', 'backgroundMime',false); |
|
252 | + $backgroundLogo = $this->config->getAppValue('theming', 'backgroundMime', false); |
|
253 | 253 | |
254 | 254 | $backgroundExists = true; |
255 | 255 | try { |