public function addAction()
 {
     // TODO Auto-generated ChannelController::indexAction() default action
     $arUser = $this->authenticate();
     if (!$this->_request->isPost()) {
         return;
     }
     $channels = new Channels();
     $channelID = $channels->addChannel($this->getRequest()->getParam('title'), $arUser['id']);
     if ($channelID !== false) {
         $this->_helper->redirector->goto('add', 'item', null, array('channel_id' => $channelID));
     }
 }
Esempio n. 2
0
 public static function addChannels($chans)
 {
     foreach ($chans as $chan) {
         Channels::addChannel($chan);
     }
 }