Esempio n. 1
0
 /**
  * Populates a new bug's data with all table's columns with defaults
  */
 private function initNewBug()
 {
     $this->bugID = Liste::getAIval($this->bugInfos->getTable());
     foreach (Liste::getCols($this->bugInfos->getTable()) as $col) {
         $val = '';
         if ($col === 'id') {
             $val = $this->bugID;
         }
         if ($col === 'date') {
             $val = date('Y-m-d H:i:s');
         }
         if ($col === 'author') {
             $val = 'Admin';
         }
         if ($col === 'priority') {
             $val = 4;
         }
         if ($col === 'closed') {
             $val = 0;
         }
         if ($col === 'FK_comment_ID') {
             $val = '[]';
         }
         $this->bugData[$col] = $val;
     }
 }