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
16 public $ticket_id; // string(16) not_null
21 if (isset($cache[$this->repo_id])) {
22 return $cache[$this->repo_id];
24 $r = DB_DataObject::factory('mtrack_repos');
25 $r->get($this->repo_id);
26 $cache[$this->repo_id] = $r;
30 function notifyENDOFDAYMAIL($rcpt, $last_sent_date, $notify, $force)
32 // fisrst use history to show a list of changes between the dates.
33 //die("building end of day mail");
34 // var_dump($notify->act_start );
35 $start = date('Y-m-d H:i:s', strtotime($notify->act_start . ' - 1 DAY'));
36 $end = date('Y-m-d H:i:s', strtotime($notify->act_start));
39 $branch = $this->name;
42 //$this->impl()->debug=1;
43 //print_r(array('since'=> '{'.$start.'}' , 'before' => '{'.$end .'}'));
45 $res = $this->repo()->impl()->history('.', array('since'=> '{'.$start.'}' , 'before' => '{'.$end .'}'), $object, $branch);
47 // find the last rev the day before...
51 $obj = $this->repo()->historyToSummary($res, $notify->act_start);
53 // echo "History returned nothing";
56 $obj->from_dt = $start;
58 $obj->branch = $this->name;
62 $ret = $rcpt->buildMail('repo_daily_changes', $obj);