3 * Table Definition for mtrack_repos
5 class_exists('DB_DataObject') ? '' : require_once 'DB/DataObject.php';
7 class Pman_MTrack_DataObjects_Mtrack_repos_branch extends DB_DataObject
10 /* the code below is auto generated do not remove the above tag */
12 public $__table = 'mtrack_repos_branch'; // table name
13 public $id; // int(11) not_null primary_key auto_increment
14 public $name; // string(64) not_null
15 public $repo_id; // string(16) not_null
20 if (isset($cache[$this->repo_id])) {
21 return $cache[$this->repo_id];
23 $r = DB_DataObject::factory('mtrack_repo');
24 $r->get($this->repo_id);
25 $cache[$this->repo_id] = $r;
29 function notifyENDOFDAYMAIL($rcpt, $last_sent_date, $notify, $force)
31 // fisrst use history to show a list of changes between the dates.
32 //die("building end of day mail");
33 // var_dump($notify->act_start );
34 $start = date('Y-m-d H:i:s', strtotime($notify->act_start . ' - 1 DAY'));
35 $end = date('Y-m-d H:i:s', strtotime($notify->act_start));
38 $branch = $this->name;
41 //$this->impl()->debug=1;
42 //print_r(array('since'=> '{'.$start.'}' , 'before' => '{'.$end .'}'));
44 $res = $this->repo()->impl()->history('.', array('since'=> '{'.$start.'}' , 'before' => '{'.$end .'}'), $object, $branch);
46 // find the last rev the day before...
50 $obj = $this->repo()->historyToSummary($res, $notify->act_start);
52 // echo "History returned nothing";
55 $obj->from_dt = $start;
57 $obj->branch = $this->name;
61 $ret = $rcpt->buildMail('repo_daily_changes', $obj);