Ejemplo n.º 1
0
 public function topicAlterAction()
 {
     if (!$this->request['alter']) {
         $model = new GroupsModel();
         $topics = $model->selectTopics($this->request['pid']);
         $access_mod = $model->checkAccessSubGroupMod($this->request['id'], $this->request['pid']);
         $this->_view->__set("tid", $this->request['tid']);
         $this->_view->__set("pid", $this->request['pid']);
         $this->_view->__set("topics", $topics);
         $alter_topic = $model->selectAlterTopic($this->request['pid'], $this->request['tid']);
         $this->_view->__set("alter_topic", $alter_topic);
         $this->_view->__set("access_mod", $access_mod);
         $this->_view->topicsView();
         $this->_view->parse();
     } else {
         $model = new GroupsModel();
         $model->alterTopic($this->request);
         Project::getResponse()->redirect(Project::getRequest()->createUrl('Groups', 'topicView') . '/pid:' . $this->request['pid'] . '/tid:' . $this->request['tid']);
     }
 }