|
32 | 32 | use function is_array; |
33 | 33 | use function is_string; |
34 | 34 | use function json_decode; |
35 | | -use function mb_strlen; |
36 | 35 | use function mb_strpos; |
37 | 36 | use function mb_substr; |
38 | 37 | use function parse_str; |
39 | 38 | use function parse_url; |
40 | 39 | use function preg_match; |
41 | 40 | use function preg_replace; |
42 | | -use function session_write_close; |
43 | 41 | use function sprintf; |
44 | 42 | use function str_replace; |
45 | 43 | use function strlen; |
46 | 44 | use function strpos; |
47 | 45 | use function strtolower; |
48 | 46 | use function substr; |
49 | | -use function trigger_error; |
50 | 47 | use function unserialize; |
51 | 48 | use function urldecode; |
52 | 49 |
|
53 | 50 | use const DATE_RFC1123; |
54 | | -use const E_USER_ERROR; |
55 | 51 | use const E_USER_WARNING; |
56 | 52 | use const FILTER_VALIDATE_IP; |
57 | 53 |
|
@@ -257,50 +253,6 @@ public static function getenv(string $varName): string |
257 | 253 | return ''; |
258 | 254 | } |
259 | 255 |
|
260 | | - /** |
261 | | - * Send HTTP header, taking IIS limits into account (600 seems ok) |
262 | | - * |
263 | | - * @param string $uri the header to send |
264 | | - * @param bool $useRefresh whether to use Refresh: header when running on IIS |
265 | | - */ |
266 | | - public static function sendHeaderLocation(string $uri, bool $useRefresh = false): void |
267 | | - { |
268 | | - if ($GLOBALS['config']->get('PMA_IS_IIS') && mb_strlen($uri) > 600) { |
269 | | - ResponseRenderer::getInstance()->disable(); |
270 | | - |
271 | | - $template = new Template(); |
272 | | - echo $template->render('header_location', ['uri' => $uri]); |
273 | | - |
274 | | - return; |
275 | | - } |
276 | | - |
277 | | - /** |
278 | | - * Avoid relative path redirect problems in case user entered URL |
279 | | - * like /phpmyadmin/index.php/ which some web servers happily accept. |
280 | | - */ |
281 | | - if ($uri[0] === '.') { |
282 | | - $uri = $GLOBALS['config']->getRootPath() . substr($uri, 2); |
283 | | - } |
284 | | - |
285 | | - $response = ResponseRenderer::getInstance(); |
286 | | - |
287 | | - session_write_close(); |
288 | | - if ($response->headersSent()) { |
289 | | - trigger_error('Core::sendHeaderLocation called when headers are already sent!', E_USER_ERROR); |
290 | | - } |
291 | | - |
292 | | - // bug #1523784: IE6 does not like 'Refresh: 0', it |
293 | | - // results in a blank page |
294 | | - // but we need it when coming from the cookie login panel) |
295 | | - if ($GLOBALS['config']->get('PMA_IS_IIS') && $useRefresh) { |
296 | | - $response->header('Refresh: 0; ' . $uri); |
297 | | - |
298 | | - return; |
299 | | - } |
300 | | - |
301 | | - $response->header('Location: ' . $uri); |
302 | | - } |
303 | | - |
304 | 256 | /** |
305 | 257 | * Returns application/json headers. This includes no caching. |
306 | 258 | * |
|
0 commit comments