function _getData() { // turnier $query = 'SELECT name, teil, typ, tiebr1, tiebr2, tiebr3' . ' FROM #__clm_turniere' . ' WHERE id = ' . $this->param['id']; $this->_db->setQuery($query); $this->turnier = $this->_db->loadObject(); // players $query = 'SELECT *' . ' FROM #__clm_turniere_tlnr' . $this->_sqlWhere(); $this->playersTotal = $this->_getListCount($query); $query .= $this->_sqlOrder() . ' LIMIT ' . $this->limitstart . ', ' . $this->limit; $this->_db->setQuery($query); $this->turPlayers = $this->_db->loadObjectList(); // Flag, ob gestartet $tournament = new CLMTournament($this->param['id'], TRUE); $tournament->checkTournamentStarted(); $this->turnier->started = $tournament->started; // wenn nicht gestartet, check, ob Startnummern okay if (!$tournament->started and !$tournament->checkCorrectSnr()) { JError::raiseWarning(500, JText::_('PLEASE_CORRECT_SNR')); } }
function _getData() { // turnier $query = 'SELECT name, teil, typ, tiebr1, tiebr2, tiebr3, tl, params' . ' FROM #__clm_turniere' . ' WHERE id = ' . $this->param['id']; $this->_db->setQuery($query); $this->turnier = $this->_db->loadObject(); // players $query = 'SELECT a.*, rt.name as koRoundName ' . ' FROM #__clm_turniere_tlnr as a' . ' LEFT JOIN #__clm_turniere_rnd_termine AS rt ON rt.turnier = a.turnier AND rt.nr = a.koRound ' . $this->_sqlWhere(); $this->playersTotal = $this->_getListCount($query); if ($this->limit > 0) { $query .= $this->_sqlOrder() . ' LIMIT ' . $this->limitstart . ', ' . $this->limit; } $this->_db->setQuery($query); $this->turPlayers = $this->_db->loadObjectList(); // Flag, ob gestartet $tournament = new CLMTournament($this->param['id'], true); $tournament->checkTournamentStarted(); $this->turnier->started = $tournament->started; // wenn nicht gestartet, check, ob Startnummern okay if (!$tournament->started and !$tournament->checkCorrectSnr()) { JError::raiseWarning(500, JText::_('PLEASE_CORRECT_SNR')); } }