X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=htdocs%2Flib%2Fgraph.class.php;h=78deef381d341161ca9e988b45e654af1fcf8fb1;hb=cdf14cc9d75eb1919d8730c33b2921a0112e5c23;hp=33c36b39e0d0d301c265455f9afc67a2a7860e95;hpb=ce9f1b8b05ff571f6922460cf91b45aa5a119d94;p=phpgitweb.git diff --git a/htdocs/lib/graph.class.php b/htdocs/lib/graph.class.php index 33c36b3..78deef3 100644 --- a/htdocs/lib/graph.class.php +++ b/htdocs/lib/graph.class.php @@ -42,13 +42,16 @@ class graph_data_generator { } unset($branch); if($existing) - continue; + return; + $name_arr = array(); + if($name) + $name_arr[] = $name; $this->data['branches'][count($this->data['branches'])] = array( "id" => $this->brach_id++, "uid" => $this->branch_uid++, "active" => true, "sticky" => true, - "name" => array($name), + "name" => $name_arr, "next" => $first_id, "pre_merge" => false ); @@ -147,7 +150,7 @@ class graph_data_generator { $branch['active'] = false; $commit['dot_type'] = self::DOT_TYPE_INIT; } - $branch['next'] = (array_key_exists('parent', $commit) ? $commit['parent'][0] : null); + $branch['next'] = ((array_key_exists('parent', $commit) && count($commit['parent'])) ? $commit['parent'][0] : null); $branch['pre_merge'] = false; $this->data['ubranches'][$branch['uid']] = $this->data['branches'][$branch['id']-1]; @@ -349,6 +352,7 @@ class graph_image_generator { header('Content-Type: image/png'); imagepng($image); imagedestroy($image); + die(); } private function parse_data($data) {