2
0
forked from Wavyzz/dolibarr

Fix on permission test

This commit is contained in:
Laurent Destailleur
2024-09-06 16:47:50 +02:00
parent 1ee98df0d7
commit 0f979a31f3
4 changed files with 7 additions and 7 deletions

View File

@@ -662,7 +662,7 @@ class CodingPhpTest extends CommonClassTest
$filecontentaction = $filecontent;
}
preg_match_all('/if.*\(\s*\$action\s*==\s*[\'"][a-z]+[\'"].*/', $filecontentaction, $matches, PREG_SET_ORDER);
preg_match_all('/if.*\$action\s*==\s*[\'"][a-z\-]+[\'"].*/', $filecontentaction, $matches, PREG_SET_ORDER);
foreach ($matches as $key => $val) {
if (!preg_match('/\$user->hasR/', $val[0])
&& !preg_match('/\$permission/', $val[0])