update, delete module from shop on local page
This commit is contained in:
@ -109,13 +109,20 @@ class ModuleController extends AdminController
|
||||
public function actionUpdate(): void
|
||||
{
|
||||
$request = new Request();
|
||||
$active_res = $this->moduleService->updateModule($request->get("slug"));
|
||||
if (!$active_res){
|
||||
Session::start();
|
||||
Session::set("error", implode(";", $this->moduleService->getErrors()));
|
||||
$this->redirect("/admin", 302);
|
||||
$slug = $request->get('slug');
|
||||
if ($this->moduleService->isKernelModule($slug)) {
|
||||
$active_res = $this->moduleService->updateModule($request->get("slug"));
|
||||
if (!$active_res){
|
||||
Session::start();
|
||||
Session::set("error", implode(";", $this->moduleService->getErrors()));
|
||||
$this->redirect("/admin", 302);
|
||||
}
|
||||
$mod_info = $this->moduleService->getModuleInfoBySlug($request->get('slug'));
|
||||
} else {
|
||||
$this->redirect("/admin/module_shop_client/update/?slug=" . $slug, 302);
|
||||
}
|
||||
$mod_info = $this->moduleService->getModuleInfoBySlug($request->get('slug'));
|
||||
|
||||
|
||||
|
||||
$this->cgView->render("view.php", ['data' => $mod_info]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user