final move of files
[web.mtrack] / MTrackWeb / Browse.php
1 <?php # vim:ts=2:sw=2:et:
2 /* For licensing and copyright terms, see the file named LICENSE */
3
4 // Browse.php - only for rendering the body..
5 // Tree.php - the actually tree..
6
7 require_once 'MTrackWeb.php';
8
9 class MTrackWeb_Browse extends MTrackWeb
10 {
11     var $template = 'browse.html'; 
12  
13  
14      
15     function getAuth() 
16     {
17         parent::getAuth();
18         
19         MTrackACL::requireAllRights('Browser', 'read');
20         return true;
21   
22     }
23  
24     function get($pi)
25     {
26         
27         
28         $this->pi = '/'. $pi . (strlen($pi) ? $this->bootLoader->ext : '');
29         $this->pi = rtrim($this->pi, '/');
30        // var_dump($this->pi);pi
31         $crumbs = MTrackSCM::makeBreadcrumbs($this->pi); // i think this modifieds pi... naughty really.
32         
33         if (!strlen($this->pi) || $this->pi == '/') {
34             $this->pi = '';
35         }
36
37         $this->repo  = (count($crumbs) > 2) ?   MTrackSCM::factory($this->pi) : null ;
38          
39          
40         $this->object = null;
41         $this->ident = null;
42         
43         if (isset($_GET['jump']) && strlen($_GET['jump'])) {
44             list($this->object, $this->ident) = explode(':', $_GET['jump'], 2);
45         }
46         
47         $this->repoName = $this->repo ? $this->repo->displayName() : '';
48         
49   
50     }
51      
52     
53      
54    
55     
56 }
57     
58
59  
60     
61
62