function getMatches($month, $year) { $livescore = $this->params->get('livescore', ''); $joomleague = $this->params->get('joomleague', ''); $caldates = array(); $caldates['start'] = date("{$year}-{$month}-01 00:00:00"); $caldates['end'] = date("{$year}-{$month}-31 23:59:59"); $jlrows = array(); $lsrows = array(); $usejevents = $this->params->get('jevents', 0); //$user = JFactory::getUser(); //if ($user->id == 62) $usejevents = 1; if ($usejevents == 1) { $day = 0; require_once dirname(__FILE__) . DS . 'connectors' . DS . 'jevents.php'; JEventsConnector::getEntries($caldates, $this->params, $this->matches); } require_once dirname(__FILE__) . DS . 'connectors' . DS . $joomleague . '.php'; $this->params->prefix = $this->prefix; JoomleagueConnector::getEntries($caldates, $this->params, $this->matches); if ($livescore != '') { require_once dirname(__FILE__) . DS . 'connectors' . DS . 'livescore.php'; $this->params->prefix = $this->params->get('prefix_livescore', ''); LivescoreConnector::getMatches($caldates, $this->params, $this->matches); } $matches = $this->sortArray($this->matches, 'asc', 'date'); $this->matches = $matches; return $matches; }
function getMatches($month, $year) { $livescore = $this->params->get('livescore', ''); $joomleague = $this->params->get('joomleague', ''); $caldates = array(); $caldates['start'] = date("{$year}-{$month}-01 00:00:00"); $caldates['end'] = date("{$year}-{$month}-31 23:59:59"); $jlrows = array(); $lsrows = array(); $usejevents = $this->params->get('jevents', 0); if ($usejevents == 1) { $day = 0; require_once dirname(__FILE__) . '/connectors/jevents.php'; JEventsConnector::getEntries($caldates, $this->params, $this->matches); } require_once dirname(__FILE__) . '/connectors/' . $joomleague . '.php'; $this->params->prefix = $this->prefix; // @todo Check! $entries = new JoomleagueConnector($this->params); $entries->getEntries($caldates, $this->params, $this->matches); /* JoomleagueConnector::getEntries($caldates, $this->params, $this->matches); */ if ($livescore != '') { require_once dirname(__FILE__) . '/connectors/livescore.php'; $this->params->prefix = $this->params->get('prefix_livescore', ''); LivescoreConnector::getMatches($caldates, $this->params, $this->matches); } $matches = $this->sortArray($this->matches, 'asc', 'date'); $this->matches = $matches; return $matches; }