class shortlog {
private $project;
- private $graph_data;
+ private $graph_data, $graph_gen;
private $first_commit;
private $have_more = false;
}
}
$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;
$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']));