X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=htdocs%2Fpages%2Fsummary.class.php;h=0e3eae63ff62a39c88482c0da6f84f306bfef04a;hb=394a07ff3e283f94c7ead44e8bd02d44c223314b;hp=30838e125e0c08d6876ea3571a3e260bbb5716f3;hpb=0a6d29345b57ef71b076003e18d13efd3478764c;p=phpgitweb.git diff --git a/htdocs/pages/summary.class.php b/htdocs/pages/summary.class.php index 30838e1..0e3eae6 100644 --- a/htdocs/pages/summary.class.php +++ b/htdocs/pages/summary.class.php @@ -24,16 +24,33 @@ class page_summary { public function main($phpgitweb, $project) { $this->phpgitweb = $phpgitweb; if(!$project) - return; + return new ContentProvider('main', 'err400'); $project['refs'] = $phpgitweb->get_project_loader()->getProjectRefs($project); + $phpgitweb->append_header_nav("summary", null, true); + $phpgitweb->append_title("summary"); $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', gmdate('r', $first_commit['committer_time'])); return $this->page; }