pi = empty($pi) ? '' : ($pi . $this->bootLoader->ext); $this->repo = DB_DataObject::factory('mtrack_repos'); $this->filename = $this->repo->loadFromPath($this->pi); if (!$this->repo->id) { return HTML_FlexyFramework::run('Browse'); }; if (!$this->projectPerm($this->repo->project_id, 'MTrack.Repos', 'S')) { return HTML_FlexyFramework::run('Noperm'); // noperm = loggedin -> need more perms / not.. try loggin in.. } $this->tree(); exit; } function tree() { $live = 'master'; $release = 'github'; $this->repo->debug = 1; $ar = $this->repo->history("/", null, "rev", "$release..$live"); // the point of this is to extract all the revisions, and group them. //echo '
';print_R($ar); // need to get a 2 dimensional array of // files along top, and commints down. $cfiles = array(); $rows = array(); foreach($ar as $commit) { $files = $commit->files; $day = date("Y-m-d", strtotime($commit->ctime)); if (!isset($days[$day])) { $days[$day] = array( 'title' => $day, 'rev' => $day, 'children' => array() ); } $time= date("H:i:s", strtotime($commit->ctime)); if (!isset($days[$day]['children'][$time])) { $days[$day]['children'][$time] = array( 'title' => $time, 'rev' => $day . ' ' . $time, 'commits' =>array(), ); } $days[$day]['children'][$time]['children'][] = array( 'title'=> $commit->changelog, 'rev' => $commit->rev ); } // this might result in alot of white boxes where you can // let's see what it looks like.. echo '';print_R($days); } }