|
21 | 21 | include_once __DIR__.'/../../core.php'; |
22 | 22 | include_once __DIR__.'/modutil.php'; |
23 | 23 |
|
| 24 | +// Definizioni di fallback per le funzioni base |
| 25 | +if (!function_exists('base_path')) { |
| 26 | + function base_path() |
| 27 | + { |
| 28 | + return ROOTDIR; |
| 29 | + } |
| 30 | +} |
| 31 | + |
| 32 | +if (!function_exists('base_dir')) { |
| 33 | + function base_dir() |
| 34 | + { |
| 35 | + return DOCROOT; |
| 36 | + } |
| 37 | +} |
| 38 | + |
24 | 39 | use Models\Module; |
25 | 40 |
|
26 | 41 | // Inizializzazione del modulo corrente |
@@ -180,12 +195,12 @@ function highlightDifferences($current, $expected) { |
180 | 195 |
|
181 | 196 | if (function_exists('customComponents')) { |
182 | 197 | $custom = customComponents(); |
183 | | - $custom_files = customStructureWithFiles(); |
184 | | - $tables = customTables(); |
185 | | - $custom_fields = customFields(); |
| 198 | + $custom_files = function_exists('customStructureWithFiles') ? customStructureWithFiles() : []; |
| 199 | + $tables = function_exists('customTables') ? customTables() : []; |
| 200 | + $custom_fields = function_exists('customFields') ? customFields() : []; |
186 | 201 |
|
187 | | - $custom_views_not_standard = customViewsNotStandard(); |
188 | | - $custom_modules_not_standard = customModulesNotStandard(); |
| 202 | + $custom_views_not_standard = function_exists('customViewsNotStandard') ? customViewsNotStandard() : []; |
| 203 | + $custom_modules_not_standard = function_exists('customModulesNotStandard') ? customModulesNotStandard() : []; |
189 | 204 |
|
190 | 205 | // Determina se ci sono errori per ogni sezione |
191 | 206 | $has_file_errors = !empty($custom_files); |
@@ -608,19 +623,7 @@ function highlightDifferences($current, $expected) { |
608 | 623 | } |
609 | 624 | } |
610 | 625 |
|
611 | | -if (!function_exists('base_path')) { |
612 | | - function base_path() |
613 | | - { |
614 | | - return ROOTDIR; |
615 | | - } |
616 | | -} |
617 | 626 |
|
618 | | -if (!function_exists('base_dir')) { |
619 | | - function base_dir() |
620 | | - { |
621 | | - return DOCROOT; |
622 | | - } |
623 | | -} |
624 | 627 |
|
625 | 628 | $alerts = []; |
626 | 629 |
|
|
0 commit comments