1 <?php # vim:ts=2:sw=2:et:
2 /* For licensing and copyright terms, see the file named LICENSE */
4 // Browse.php - only for rendering the body..
5 // Tree.php - the actually tree..
7 require_once 'MTrackWeb.php';
9 class MTrackWeb_Browse extends MTrackWeb
11 var $template = 'browse.html';
19 MTrackACL::requireAllRights('Browser', 'read');
28 $this->pi = '/'. $pi . (strlen($pi) ? $this->bootLoader->ext : '');
29 $this->pi = rtrim($this->pi, '/');
31 $crumbs = MTrackSCM::makeBreadcrumbs($this->pi);
33 if (!strlen($this->pi) || $this->pi == '/') {
36 if (count($crumbs) < 3) {
37 return; // no repo selected...
40 $this->repo = DB_DataObject::factory('mtrack_repos');
41 $this->repo->parent = $crumbs[0] == 'default' ? '' : 'user:' . $crumbs[0];
42 $this->repo->get('shortname', $crumbs[1]);
44 // $this->repo = (count($crumbs) > 2) ? MTrackSCM::factory($this->pi) : null ;
50 if (isset($_GET['jump']) && strlen($_GET['jump'])) {
51 list($this->object, $this->ident) = explode(':', $_GET['jump'], 2);
54 $this->repoName = $this->repo ? $this->repo->displayName() : '';