1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 07:36:44 +02:00

Coverage uses the same cookie so must live in the same directory

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@756 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2009-06-24 10:02:12 +00:00
parent 75fc104b8a
commit 91156d1a1d
5 changed files with 21 additions and 31 deletions

View File

@@ -171,6 +171,7 @@ if ($_SERVER["argc"] > 1) {
$filename = "adminer" . ($_COOKIE["adminer_lang"] ? "-$_COOKIE[adminer_lang]" : "") . ".php";
$file = file_get_contents(dirname(__FILE__) . "/adminer/index.php");
$file = preg_replace('(' . str_replace(' ', '\\s*', preg_quote(' if (isset($_GET["coverage"])) { include "./coverage.inc.php"; }')) . ')', '', $file);
$file = preg_replace_callback('~\\b(include|require) "([^"]*)";~', 'put_file', $file);
$file = preg_replace("~if \\(isset\\(\\\$_SESSION\\[\"coverage.*\n}\n| && !isset\\(\\\$_SESSION\\[\"coverage\"\\]\\)~sU", '', $file);
if ($_COOKIE["adminer_lang"]) {