コード例 #1
0
ファイル: item.php プロジェクト: tomzt/tfwp
 /**
  * load current task status
  * @return tfk_item_status
  */
 public function get_status()
 {
     $obj = new tfk_item_status();
     if ($pid = $this->get_uid()) {
         if ($obj->load_list(array('where' => 'item_id=' . $pid . ' AND action_code <> "" AND comment_id = 0', 'order' => 'log_date DESC', 'limit' => 1))) {
             return $obj->next(true);
         }
     }
     // no status (new item or not loaded)
     $obj->set('action_code', 0);
     $obj->set('log_date', 'NOW');
     return $obj;
 }