Ejemplo n.º 1
0
 function get($criteria = null)
 {
     $user = current_user();
     $projects = new Project();
     $activity = new Activity();
     $this->projects = $projects->get();
     $this->activity = $activity->get();
 }
Ejemplo n.º 2
0
 function do_index()
 {
     $MAX = 200;
     $activities = new Activity();
     $activities->order_by('created desc');
     $activities->limit(100);
     $activities = $activities->get();
     // Keep number of records from growing unbounded
     if ($activities->count() > $MAX) {
         $toDelete = new Activity();
         $toDelete->order_by('created desc');
         $toDelete->limit($MAX, $MAX / 2);
         $toDelete->get();
         $toDelete->delete_all();
     }
     $this->template->write_view('content', 'activities/index', array('activities' => $activities));
     $this->template->render();
 }
Ejemplo n.º 3
0
 function get_activity()
 {
     $activity = new Activity();
     return $activity->get('WHERE project_id = ' . $this->id);
 }