From ce9f1b8b05ff571f6922460cf91b45aa5a119d94 Mon Sep 17 00:00:00 2001 From: pk910 Date: Thu, 14 Feb 2013 08:37:12 +0100 Subject: [PATCH] fixed delimiter of header graph --- htdocs/lib/graph.class.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/lib/graph.class.php b/htdocs/lib/graph.class.php index 53f1aae..33c36b3 100644 --- a/htdocs/lib/graph.class.php +++ b/htdocs/lib/graph.class.php @@ -255,7 +255,7 @@ class graph_data_generator { foreach($this->data['branches'] as $branch) { if(array_key_exists('sticky', $branch) && $branch['sticky']) { $name = explode('/', $branch['name'][0], 3); - $dataadd .= "\n".$branch['id'].":".$name[2]; + $dataadd .= "//".$branch['id'].":".$name[2]; $branchcount++; } } @@ -295,8 +295,10 @@ class graph_image_generator { if(!GitConfig::GITGRAPH_ENABLE) return; $data = $this->parse_data($data); - if(!$data) - return; + if(!$data) { + header('Content-Type: text/plain'); + die(base64_decode("ICAgIC0tLS0tLS0tOi0tLS0tLS0tDQogICAgICAgICAgLC0iLC5fX19fX19fIC8NCiAgICAgICAgIC8gKSB8ICAgLC0tLS0nXA0KICAgICAgICAgXC9fX3wuLSINCiAgICAgICAgLl8vL19cXF8NCk5vdCB3aGF0IHlvdSBleHBlY3RlZCwgZWVlaD8=")); + } $count = $data['count']; if($count > $this->max_branches) @@ -315,7 +317,7 @@ class graph_image_generator { } private function display_header($header) { - $header = explode("\n",$header); + $header = explode("//",$header); $count = $header[0]; $header = array_slice($header, 1); if($count > $this->max_branches) -- 2.20.1