From b2ec035d21b69bb0d5eab5b240c8d5498bc8f3a1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 1 May 2022 17:39:57 +0200 Subject: [PATCH] Debug v16 --- htdocs/modulebuilder/index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index c0c9bf2dde5..8874e23c02b 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -826,11 +826,12 @@ if ($dirins && $action == 'confirm_removefile' && !empty($module)) { // Now we update the lib file to set $showtabofpagexxx to 0 $varnametoupdate = ''; + $reg = array(); if (preg_match('/_([a-z]+)\.php$/', $relativefilename, $reg)) { $varnametoupdate = 'showtabofpage'.$reg[1]; } if ($varnametoupdate) { - $srcfile = $dirins.'/'.strtolower($module).'/class/'.strtolower($objectname).'.class.php'; + $srcfile = $dirins.'/'.strtolower($module).'/lib/'.strtolower($module).'_'.strtolower($objectname).'.lib.php'; $arrayreplacement = array('/\$'.$varnametoupdate.' = 1;/' => '$'.$varnametoupdate.' = 0;'); dolReplaceInFile($srcfile, $arrayreplacement, '', 0, 0, 1); }