public function matchAction() { $model = new ProfileModel(); $uriOptions = Request::getUriOptions(); $match = $model->getMatchByID($uriOptions[0]); if (!$match) { error404(); } $users = $model->getMatchUsers($match->uid, $match->pid); setSession('match_' . $match->id, $match->id); //if ($match->uid == $users[0]->id) { if (Request::getParam('user')->id == $users[0]->id) { $this->view->uid = $users[0]; $this->view->pid = $users[1]; } else { $this->view->uid = $users[1]; $this->view->pid = $users[0]; } if ($match->uid == Request::getParam('user')->id) { $this->view->ready = $match->uready; } else { $this->view->ready = $match->pready; } $this->view->match = $match; //$this->view->assets = $model->getMatchAssets(Request::getParam('user')->id, $match->id); // enable if want init users assets load $this->view->list = $model->getChatMessages($match->id); $this->view->langPars = true; $this->view->title = $users[0]->nickname . ' ' . Lang::translate('MATCH_VS') . ' ' . $users[1]->nickname; }