X-Git-Url: http://git.pk910.de/?p=phpgitweb.git;a=blobdiff_plain;f=htdocs%2Flib%2FPageClasses.shortlog.class.php;fp=htdocs%2Flib%2FPageClasses.shortlog.class.php;h=500167501471ad0053f35763cce2aa9fb6c2296a;hp=75573f28abde66f1b9d6cc20eb3e10ecb332f0b9;hb=574f4ed4076c84231ec75dc70a9120c553e37374;hpb=ee39a29d2d94cb45f3634bc853f223192d3ad0d4 diff --git a/htdocs/lib/PageClasses.shortlog.class.php b/htdocs/lib/PageClasses.shortlog.class.php index 75573f2..5001675 100644 --- a/htdocs/lib/PageClasses.shortlog.class.php +++ b/htdocs/lib/PageClasses.shortlog.class.php @@ -18,7 +18,7 @@ class shortlog { private $project; - private $graph_data; + private $graph_data, $graph_gen; private $first_commit; private $have_more = false; @@ -61,7 +61,16 @@ class shortlog { } } $this->graph_data->parse($commits); - $content->set('graph_data', $this->graph_data->get_header_graph()); + + $graph = $this->graph_data->get_header_graph(); + if(GitConfig::GITGRAPH_DATA_URL) { + $this->graph_gen = new graph_image_generator(); + $graph = $this->graph_gen->generate($graph, true); + $graph = base64_encode($graph); + $graph = "data:image/png;base64,".$graph; + } else + $graph = "?e=graph&gd=".$graph; + $content->set('graph_data', $graph); } $commit_counter = 0; @@ -108,8 +117,16 @@ class shortlog { $entry->set('date', $date_str); $entry->set('age', $age_str); } - if(GitConfig::GITGRAPH_ENABLE) - $entry->set('graph_data', $this->graph_data->get_graph($commit['id'])); + if(GitConfig::GITGRAPH_ENABLE) { + $graph = $this->graph_data->get_graph($commit['id']); + if(GitConfig::GITGRAPH_DATA_URL) { + $graph = $this->graph_gen->generate($graph, true); + $graph = base64_encode($graph); + $graph = "data:image/png;base64,".$graph; + } else + $graph = "?e=graph&gd=".$graph; + $entry->set('graph_data', $graph); + } $entry->set('refs', $this->shortlog_commit_refs($this->project, $commit['id']));