2
0
forked from Wavyzz/dolibarr

Clean code

This commit is contained in:
Laurent Destailleur
2023-12-27 12:12:20 +01:00
parent 89686e74dc
commit b28ae5d8d3
115 changed files with 238 additions and 240 deletions

View File

@@ -201,7 +201,7 @@ class FormAdmin
$handle = opendir($dir);
if (is_resource($handle)) {
while (($file = readdir($handle)) !== false) {
if (is_file($dir."/".$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && substr($file, 0, 5) != 'index') {
if (is_file($dir."/".$file) && substr($file, 0, 1) != '.' && substr($file, 0, 3) != 'CVS' && substr($file, 0, 5) != 'index') {
if (preg_match('/lib\.php$/i', $file)) {
continue; // We exclude library files
}
@@ -301,7 +301,7 @@ class FormAdmin
$handle = opendir($dir);
if (is_resource($handle)) {
while (($file = readdir($handle)) !== false) {
if (is_file($dir."/".$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS') {
if (is_file($dir."/".$file) && substr($file, 0, 1) != '.' && substr($file, 0, 3) != 'CVS') {
$filelib = preg_replace('/(_backoffice|_frontoffice)?\.php$/i', '', $file);
if (preg_match('/^index/i', $filelib)) {
continue;