public function syncWithEngine() { $res = new responseCsp(); if (($syncMsg = $this->getModel()->syncWithEngine(reqCsp::get('post'))) !== false) { $res->addMessage(empty($syncMsg) ? langCsp::_('Done') : $syncMsg); } else { $res->pushError($this->getModel()->getErrors()); } return $res->ajaxExec(); }
public function recreatePages() { $res = new responseCsp(); if ($this->getModel()->recreatePages()) { $res->addMessage(langCsp::_('Pages was recreated')); } else { $res->pushError($this->getModel()->getErrors()); } $res->ajaxExec(); }
public function saveRole() { $res = new responseCsp(); if (($roleRetData = $this->getModel()->saveRole(reqCsp::get('post'))) !== false) { $res->addMessage(langCsp::_('Role change')); //$res->addData($roleRetData); } else { $res->pushError($this->getModel('access')->getErrors()); } return $res->ajaxExec(); }
public function welcomePageSaveInfo() { $res = new responseCsp(); installerCsp::setUsed(); if ($this->getModel()->welcomePageSaveInfo(reqCsp::get('get'))) { $res->addMessage(langCsp::_('Information was saved. Thank you!')); } else { $res->pushError($this->getModel()->getErrors()); } $originalPage = reqCsp::getVar('original_page'); $returnArr = explode('|', $originalPage); $return = $this->getModule()->decodeSlug(str_replace('return=', '', $returnArr[1])); $return = admin_url(strpos($return, '?') ? $return : 'admin.php?page=' . $return); redirect($return); //return $res->ajaxExec(); }
public function activateUpdate() { $res = new responseCsp(); if ($this->getModel('modules')->activateUpdate(reqCsp::get('post'))) { $res->addMessage(langCsp::_('Very good! Now plugin will be updated.')); } else { $res->pushError($this->getModel('modules')->getErrors()); } return $res->ajaxExec(); }