예제 #1
0
 /**
  * bearbeitet und überprüft Daten
  *
  */
 function checkData()
 {
     $this->name = trim($this->name);
     if (strlen($this->name) == 0) {
         $this->setError(CLMText::errorText('ROUND_NAME', 'MISSING'));
         return false;
     } elseif ($this->nr < 1) {
         $this->setError(CLMText::errorText('ROUND_NR', 'MISSING'));
         return false;
     }
     // weitere
     if ($this->tl_ok == 1) {
         // Bestätigung gesetzt?
         $tournamentRound = new CLMTournamentRound($this->turnier, $this->id);
         if (!$tournamentRound->checkResultsComplete()) {
             $this->setError(CLMText::errorText('RESULTS', 'INCOMPLETE'));
             return false;
         }
     }
     if ($this->startzeit != '') {
         if (!CLMText::isTime($this->startzeit, true, false)) {
             $this->setError(CLMText::errorText('RUNDE_STARTTIME', 'IMPOSSIBLE'));
             return false;
         }
     }
     return true;
 }