From a842756b34e19b43707ece87ea7ca0ba6c78eb5c Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Thu, 5 Jul 2007 13:23:39 +0000 Subject: [PATCH] Result indentation git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@45 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- _compile.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/_compile.php b/_compile.php index 844d58a2..1e025c80 100644 --- a/_compile.php +++ b/_compile.php @@ -6,12 +6,14 @@ function remove_lang($match) { function put_file($match) { $return = file_get_contents($match[4]); - $return = preg_replace("~\\?>?\n?\$~", '', $return); - if (substr_count($return, "") <= 0 && !$match[5]) { + $return = preg_replace("~\\?>\n?\$~", '', $return); + if (substr_count($return, "") && !$match[5]) { $return .= "\n$return"; } return $return; @@ -32,7 +34,7 @@ if ($_SESSION["lang"]) { $filename = "phpMinAdmin-$_SESSION[lang].php"; $file = str_replace("include \"./lang.inc.php\";\n", "", $file); } -$file = preg_replace_callback('~(<\\?php\\s*)?(include|require)(_once)? "([^"]*)";(\\s*\\?>)?~', 'put_file', $file); +$file = preg_replace_callback('~(<\\?php)?\\s*(include|require)(_once)? "([^"]*)";(\\s*\\?>)?~', 'put_file', $file); if ($_SESSION["lang"]) { $file = preg_replace_callback("~(<\\?php\\s*echo )?lang\\('((?:[^\\\\']*|\\\\.)+)'\\)(;\\s*\\?>)?~s", 'remove_lang', $file); $file = str_replace("\n", "", $file);