From ab15b60635ffc0066590f854a063bfd60b4f5689 Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Fri, 27 Jul 2007 11:53:04 +0000 Subject: [PATCH] Unobtrusive session cookie git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@278 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- _compile.php | 2 +- index.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/_compile.php b/_compile.php index 18eb1d8e..f0ef9344 100644 --- a/_compile.php +++ b/_compile.php @@ -64,7 +64,7 @@ if ($_COOKIE["lang"]) { } $file = str_replace("favicon.ico", '', $file); $file = str_replace("arrow.gif", '" . preg_replace("~\\\\?.*~", "", $_SERVER["REQUEST_URI"]) . "?gif=arrow', $file); -$file = str_replace('session_start();', "if (isset(\$_GET['favicon'])) {\n\theader('Content-Type: image/x-icon');\n\techo base64_decode('" . base64_encode(file_get_contents("favicon.ico")) . "');\n\texit;\n} elseif (isset(\$_GET['gif'])) {\n\theader('Content-Type: image/gif');\n\techo base64_decode('" . base64_encode(file_get_contents("arrow.gif")) . "');\n\texit;\n}\n\nsession_start();", $file); +$file = str_replace('error_reporting(E_ALL & ~E_NOTICE);', "error_reporting(E_ALL & ~E_NOTICE);\nif (isset(\$_GET['favicon'])) {\n\theader('Content-Type: image/x-icon');\n\techo base64_decode('" . base64_encode(file_get_contents("favicon.ico")) . "');\n\texit;\n} elseif (isset(\$_GET['gif'])) {\n\theader('Content-Type: image/gif');\n\techo base64_decode('" . base64_encode(file_get_contents("arrow.gif")) . "');\n\texit;\n}", $file); $file = str_replace('', "", $file); file_put_contents($filename, $file); echo "$filename created.\n"; diff --git a/index.php b/index.php index bd2a8e92..95c64cc8 100644 --- a/index.php +++ b/index.php @@ -1,8 +1,10 @@