Lines Matching defs:state

18     protected $type, $state;
32 'type', 'state',
80 $this->state = 'proposal';
89 $this->state = 'opened';
105 if ($this->state == 'proposal' && $this->original_poster == $this->model->user_nick) {
118 $this->acl->grant('state', BEZ_PERMISSION_CHANGE);
127 if (isset($data['coordinator']) && $this->state == 'proposal') {
128 $this->state = 'opened';
139 public function set_state($state) {
140 if ($this->acl_of('state') < BEZ_PERMISSION_CHANGE) {
144 if (!in_array($state, array('opened', 'closed', 'rejected'))) {
145 throw new ValidationException('thread', array('state should be opened, closed or rejected'));
149 if ($state == $this->state) {
153 if ($state == 'closed' || $state == 'rejected') {
154 $this->state = $state;
158 $this->model->sqlite->query("UPDATE {$this->get_table_name()} SET state=?, closed_by=?, close_date=? WHERE id=?",
159 $state,
165 $this->state = $state;
167 $this->model->sqlite->query("UPDATE {$this->get_table_name()} SET state=? WHERE id=?", $state, $this->id);
170 $this->state = $state;
406 return in_array($this->state, array('proposal', 'opened', 'done'));
410 return $this->type == 'issue' && in_array($this->state, array('opened', 'done'));
414 return in_array($this->state, array('opened', 'done'));
418 return in_array($this->state, array('opened', 'done'));
422 $res = $this->model->sqlite->query("SELECT state FROM task WHERE thread_id = ?
424 AND state = 'opened'", $this->id);
435 return !in_array($this->state, array('closed', 'rejected'))
442 return $this->state != 'rejected' && $this->task_count == 0;
446 return in_array($this->state, array('closed', 'rejected'));
576 if ($task->state == 'done') {