From 99d5804ffaf8663ccd0a1067cfcddcfb8c623a72 Mon Sep 17 00:00:00 2001 From: OpenXE <> Date: Thu, 10 Nov 2022 16:00:25 +0000 Subject: [PATCH] Added user edit check DisableModuls --- tools/module_creator/module_creator_php_template.txt | 6 ++++++ www/pages/produktion.php | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/tools/module_creator/module_creator_php_template.txt b/tools/module_creator/module_creator_php_template.txt index 79927c27..d3af660d 100644 --- a/tools/module_creator/module_creator_php_template.txt +++ b/tools/module_creator/module_creator_php_template.txt @@ -91,6 +91,12 @@ class PLACEHOLDER_MODULECLASSNAME { function PLACEHOLDER_EDIT() { $id = $this->app->Secure->GetGET('id'); + + // Check if other users are editing this id + if($this->app->erp->DisableModul('artikel',$id)) + { + return; + } $this->app->Tpl->Set('ID', $id); diff --git a/www/pages/produktion.php b/www/pages/produktion.php index 5901d261..067d2402 100644 --- a/www/pages/produktion.php +++ b/www/pages/produktion.php @@ -257,6 +257,11 @@ class Produktion { function produktion_edit() { $id = $this->app->Secure->GetGET('id'); + if($this->app->erp->DisableModul('produktion',$id)) + { + return; + } + $submit = $this->app->Secure->GetPOST('submit'); $this->app->Tpl->Set('ID', $id);