X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=htdocs%2Flib%2FPHPGitWeb.class.php;h=95cbe23157f071afd89b2cf0224d948db4546a1e;hb=780b7fde2894a42749ac292fa3d180147afeff1a;hp=5789d1f098152191c09d38bd4d2f013fd9451d1f;hpb=394a07ff3e283f94c7ead44e8bd02d44c223314b;p=phpgitweb.git diff --git a/htdocs/lib/PHPGitWeb.class.php b/htdocs/lib/PHPGitWeb.class.php index 5789d1f..95cbe23 100644 --- a/htdocs/lib/PHPGitWeb.class.php +++ b/htdocs/lib/PHPGitWeb.class.php @@ -23,6 +23,8 @@ require_once("lib/CommitLoader.class.php"); require_once("lib/GitCommand.class.php"); require_once("lib/Tools.class.php"); require_once("lib/Validation.class.php"); +require_once("lib/PageClasses.difftree.class.php"); +require_once("lib/PageClasses.shortlog.class.php"); require_once("lib/graph.class.php"); class PHPGitWeb { @@ -31,6 +33,7 @@ class PHPGitWeb { public function __construct() { $this->rendertime = microtime(true); + session_start(); $this->page = new ContentProvider('main', 'main'); set_error_handler(array($this, "error_handler")); $this->append_header_nav('projects', '?a=projects', false); @@ -51,7 +54,8 @@ class PHPGitWeb { $this->page->append('content', new ContentProvider('main', 'err404_project')); else { ContentProvider::overall_set('project', $this->project['name']); - ContentProvider::overall_set('project_head', "HEAD"); + ContentProvider::overall_set('commit_base_id', "all"); + ContentProvider::overall_set('commit_id', "HEAD"); $this->append_header_nav($this->project['name'], '?p='.$this->project['name'].'&a=summary', true); $this->append_title(" - ".$this->project['name'], false); $this->project_header = new ContentProvider('main', 'project_header'); @@ -77,12 +81,12 @@ class PHPGitWeb { } else $this->page->append('content', file_get_contents('pages/404.html')); if($this->project_header) { - $this->project_header->set('nav_summary', new ContentProvider('main', ($page == 'summary' ? 'project_header_nav_active' : 'project_header_nav_link'), array('name' => "summary", 'link' => "summary"))); - $this->project_header->set('nav_shortlog', new ContentProvider('main', ($page == 'shortlog' ? 'project_header_nav_active' : 'project_header_nav_link'), array('name' => "shortlog", 'link' => "shortlog"))); - $this->project_header->set('nav_log', new ContentProvider('main', ($page == 'log' ? 'project_header_nav_active' : 'project_header_nav_link'), array('name' => "log", 'link' => "log"))); - $this->project_header->set('nav_commit', new ContentProvider('main', ($page == 'commit' ? 'project_header_nav_active' : 'project_header_nav_link'), array('name' => "commit", 'link' => "commit"))); - $this->project_header->set('nav_commitdiff', new ContentProvider('main', ($page == 'commitdiff' ? 'project_header_nav_active' : 'project_header_nav_link'), array('name' => "commitdiff", 'link' => "commitdiff"))); - $this->project_header->set('nav_tree', new ContentProvider('main', ($page == 'tree' ? 'project_header_nav_active' : 'project_header_nav_link'), array('name' => "tree", 'link' => "tree"))); + $this->project_header->set('nav_summary', new ContentProvider('main', ($page == 'summary' ? 'project_header_nav_active' : 'project_header_nav_link'), array('name' => "summary", 'link' => "summary", 'link_add' => ""))); + $this->project_header->set('nav_shortlog', new ContentProvider('main', ($page == 'shortlog' ? 'project_header_nav_active' : 'project_header_nav_link'), array('name' => "shortlog", 'link' => "shortlog", 'link_add' => "&h=%commit_base_id%"))); + $this->project_header->set('nav_log', new ContentProvider('main', ($page == 'log' ? 'project_header_nav_active' : 'project_header_nav_link'), array('name' => "log", 'link' => "log", 'link_add' => "&h=%commit_base_id%"))); + $this->project_header->set('nav_commit', new ContentProvider('main', ($page == 'commit' ? 'project_header_nav_active' : 'project_header_nav_link'), array('name' => "commit", 'link' => "commit", 'link_add' => "&h=%commit_id%"))); + $this->project_header->set('nav_commitdiff', new ContentProvider('main', ($page == 'commitdiff' ? 'project_header_nav_active' : 'project_header_nav_link'), array('name' => "commitdiff", 'link' => "commitdiff", 'link_add' => "&h=%commit_id%"))); + $this->project_header->set('nav_tree', new ContentProvider('main', ($page == 'tree' ? 'project_header_nav_active' : 'project_header_nav_link'), array('name' => "tree", 'link' => "tree", 'link_add' => "&h=%commit_id%"))); } }