Lines Matching defs:thread

14         $r = $this->model->sqlite->query('SELECT create_date FROM thread ORDER BY id LIMIT 1');
38 FROM thread_participant JOIN thread ON thread_participant.thread_id = thread.id
39 WHERE thread.create_date BETWEEN ? AND ?
64 FROM thread_participant JOIN thread ON thread_participant.thread_id = thread.id
65 WHERE thread.create_date BETWEEN ? AND ?";
84 FROM thread_participant JOIN thread ON thread_participant.thread_id = thread.id
194 public function initial_save(Entity $thread, $data) {
202 parent::initial_save($thread, $data);
205 $thread->add_label($label_id);
208 $thread->set_participant_flags($thread->original_poster, array('original_poster', 'subscribent'));
209 if($thread->coordinator != null) {
210 $thread->set_participant_flags($thread->coordinator, array('coordinator', 'subscribent'));
218 $thread->set_private_flag($private);
223 if ($thread->state != 'proposal' && $this->model->user_nick != $thread->coordinator) {
224 $thread->mail_inform_coordinator();
225 } elseif ($thread->state == 'proposal') {
226 $thread->mail_inform_admins();
251 public function update_save(Entity $thread, $data) {
252 $prev_coordinator = $thread->coordinator;
260 parent::update_save($thread, $data);
262 $cur_label_ids = array_keys($thread->get_labels());
267 $thread->add_label($label_id);
271 $thread->remove_label($label_id);
274 if ($thread->coordinator != null && $thread->coordinator != $prev_coordinator) {
276 $thread->remove_participant_flags($prev_coordinator, array('coordinator'));
278 $thread->set_participant_flags($thread->coordinator, array('subscribent', 'coordinator'));
281 if ($thread->acl_of('private') >= BEZ_PERMISSION_CHANGE) {
286 $thread->set_private_flag($private);
294 if ($thread->state != 'proposal' && $this->model->user_nick != $thread->coordinator) {
295 $thread->mail_inform_coordinator();