public function actionSaveCalendar() { if (!CSession::isAuth()) { $this->redirectNoAccess(); } $cal = CFactory::createCalendar(); $cal->setName(CRequest::getString("name")); $cal->setDescription(CRequest::getString("description")); $cal->setDefault(false); $cal->setResource(CSession::getCurrentPerson()->getResource()); $cal->save(); $this->redirect(WEB_ROOT . "_modules/_calendar/"); }