@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | */ |
139 | 139 | public static function header($name, $default = null) |
140 | 140 | { |
141 | - return self::getInstance()->getHeader($name, $default); |
|
141 | + return self::getInstance()->getHeader($name, $default); |
|
142 | 142 | } |
143 | 143 | |
144 | 144 | /** |
@@ -151,10 +151,10 @@ discard block |
||
151 | 151 | $header = null; |
152 | 152 | if ($this->hasHeader($name)) { |
153 | 153 | $header = $this->header[$name]; |
154 | - } else if(array_key_exists('h_' . strtolower($name), $this->query)) { |
|
155 | - $header = $this->query['h_' . strtolower($name)]; |
|
156 | - } else if(array_key_exists('HTTP_' . strtoupper(str_replace('-', '_', $name)), $this->server)) { |
|
157 | - $header = $this->server['HTTP_' . strtoupper(str_replace('-', '_', $name))]; |
|
154 | + }else if (array_key_exists('h_'.strtolower($name), $this->query)) { |
|
155 | + $header = $this->query['h_'.strtolower($name)]; |
|
156 | + }else if (array_key_exists('HTTP_'.strtoupper(str_replace('-', '_', $name)), $this->server)) { |
|
157 | + $header = $this->server['HTTP_'.strtoupper(str_replace('-', '_', $name))]; |
|
158 | 158 | } |
159 | 159 | return $header ?: $default; |
160 | 160 | } |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | $url = $this->getServer('HTTP_ORIGIN'); |
254 | 254 | } |
255 | 255 | ob_start(); |
256 | - header('Location: ' . $url); |
|
256 | + header('Location: '.$url); |
|
257 | 257 | ob_end_clean(); |
258 | 258 | Security::getInstance()->updateSession(); |
259 | 259 | exit(t('Redireccionando...')); |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | $url = $this->getServerName(); |
300 | 300 | $protocol = $hasProtocol ? $this->getProtocol() : ''; |
301 | 301 | if (!empty($protocol)) { |
302 | - $url = $protocol . $url; |
|
302 | + $url = $protocol.$url; |
|
303 | 303 | } |
304 | 304 | $url = $this->checkServerPort($url); |
305 | 305 | return $url; |
@@ -345,15 +345,15 @@ discard block |
||
345 | 345 | { |
346 | 346 | $port = (integer)$this->getServer('SERVER_PORT'); |
347 | 347 | $host = $this->getServer('HTTP_HOST'); |
348 | - if(!empty($host)) { |
|
348 | + if (!empty($host)) { |
|
349 | 349 | $parts = explode(':', $host); |
350 | 350 | $hostPort = (integer)end($parts); |
351 | - if(count($parts) > 1 && $hostPort !== $port) { |
|
351 | + if (count($parts) > 1 && $hostPort !== $port) { |
|
352 | 352 | $port = $hostPort; |
353 | 353 | } |
354 | 354 | } |
355 | 355 | if (!in_array($port, [80, 443], true)) { |
356 | - $url .= ':' . $port; |
|
356 | + $url .= ':'.$port; |
|
357 | 357 | } |
358 | 358 | return $url; |
359 | 359 | } |