public function actionFirst() { $this->validateToken(); $this->validatePermission('smartslider_edit'); $slideId = N2Request::getInt('id'); $this->validateVariable($slideId > 0, 'Slide id'); $slidesModel = new N2SmartsliderSlidesModel(); $slidesModel->first($slideId); N2Message::success(n2_('First slide changed.')); $this->response->respond(); }
public function actionFirst() { if ($this->validateToken() && $this->validatePermission('smartslider_edit')) { if (($slideId = N2Request::getInt('slideid')) && ($sliderid = N2Request::getInt('sliderid'))) { $slidesModel = new N2SmartsliderSlidesModel(); $slidesModel->first($sliderid, $slideId); $this->redirect(N2Request::getUrlReferrer()); } $this->redirect(array("sliders/index")); } }