Lines Matching defs:state
20 protected $state, $type;
43 'state', 'type',
110 $this->state = 'opened';
204 $this->acl->grant('state', BEZ_PERMISSION_CHANGE);
229 $this->acl->grant('state', BEZ_PERMISSION_CHANGE);
235 if ($this->state == 'done') {
281 public function set_state($state) {
282 if ($this->acl_of('state') < BEZ_PERMISSION_CHANGE) {
286 if (!in_array($state, array('opened', 'done'))) {
291 if ($state == $this->state) {
295 if ($state == 'done') {
296 $this->state = $state;
300 $this->model->sqlite->query("UPDATE {$this->get_table_name()} SET state=?, closed_by=?, close_date=? WHERE id=?",
301 $this->state,
307 $this->model->sqlite->query("UPDATE {$this->get_table_name()} SET state=? WHERE id=?", $state, $this->id);
310 $this->state = $state;
324 if ($this->thread_id != '' && $this->type != 'preventive' && $this->thread->state == 'closed') {
328 if ($this->state == 'opened' ||
329 ($this->state == 'done' &&
330 $this->acl_of('state') >= BEZ_PERMISSION_CHANGE)) {
338 return in_array($this->state, array('opened'));
486 $q = "SELECT id, private FROM thread_view WHERE id = ? AND state IN ('opened', 'done')";