fixed delimiter of header graph
authorpk910 <philipp@zoelle1.de>
Thu, 14 Feb 2013 07:37:12 +0000 (08:37 +0100)
committerpk910 <philipp@zoelle1.de>
Thu, 14 Feb 2013 07:55:55 +0000 (08:55 +0100)
htdocs/lib/graph.class.php

index 53f1aaee6fa5ca5120a6f492037d28ceca9cf3d5..33c36b39e0d0d301c265455f9afc67a2a7860e95 100644 (file)
@@ -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)