X-Git-Url: http://git.pjr.cc/?p=gwvp.git;a=blobdiff_plain;f=gwvplib%2Fgwvpdebug.php;h=4a5c3035157c9275935f7e52f44c2211847347c3;hp=dcc7c7a4dc03e952ef51f57d9d248733866cb650;hb=942b821d861aba1da43ef6c999141853e9f8b3a8;hpb=e9c10b0bc2d09d21b4ff0e630a140ddc58a7dccb diff --git a/gwvplib/gwvpdebug.php b/gwvplib/gwvpdebug.php index dcc7c7a..4a5c303 100644 --- a/gwvplib/gwvpdebug.php +++ b/gwvplib/gwvpdebug.php @@ -8,6 +8,21 @@ function gwvp_DebugEnabled() { global $BASE_URL, $LOGIN_TYPE; + $isgitagent = false; + + // tested the user agent bit with jgit from eclipse and normal git... seems to work + if(isset($_SERVER["HTTP_USER_AGENT"])) { + $agent = $_SERVER["HTTP_USER_AGENT"]; + error_log("in git backend with user agent $agent"); + if(stristr($agent, "git")!==false) { + $isgitagent = true; + } + } + + // we dont wan to send this to a git agent + if($isgitagent) return; + + echo "
"; if(isset($_SERVER["PHP_AUTH_USER"])) error_log("authuser: ".$_SERVER["PHP_AUTH_USER"]."\n"); echo "USERTYPE: $LOGIN_TYPE\n"; @@ -148,6 +163,8 @@ function gwvp_DebugCall() function gwvp_DebugBody() { global $BASE_URL; + + ?> Generate error message
Generate info message