. */ require_once('pages/shortlog.class.php'); class page_summary { private $page, $phpgitweb; public function main($phpgitweb, $project) { $this->phpgitweb = $phpgitweb; if(!$project) return; $project['refs'] = $phpgitweb->get_project_loader()->getProjectRefs($project); $phpgitweb->append_header_nav("summary", null, true); $this->page = new ContentProvider('summary', 'main'); $this->page->set('description', htmlentities($project['description'])); $this->page->set('owner', htmlentities($project['owner'])); $giturls = GitConfig::$GIT_BASE_URL; $urlfield = ""; foreach($giturls as $url) { if($urlfield != "") $urlfield .= "
"; $urlfield .= $url.(substr($url, -1) == '/' ? '' : '/').$project['name']; } if($urlfield != "") $this->page->set('giturl', new ContentProvider('summary', 'giturl', array('git_link' => $urlfield))); else $this->page->set('giturl', ''); $shortlog = new shortlog(); $this->page->set('shortlog', $shortlog->generate_shortlog($project, null, 16, 0, null, false)); $first_commit = $shortlog->get_first_commit(); $this->page->set('last_change', date('r', $first_commit['committer_time'])); return $this->page; } } ?>