|
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 |
@@ -245,12 +260,12 @@ function highlightDifferences($current, $expected) |
245 | 260 |
|
246 | 261 | if (function_exists('customComponents')) { |
247 | 262 | $custom = customComponents(); |
248 | | - $custom_files = customStructureWithFiles(); |
249 | | - $tables = customTables(); |
250 | | - $custom_fields = customFields(); |
| 263 | + $custom_files = function_exists('customStructureWithFiles') ? customStructureWithFiles() : []; |
| 264 | + $tables = function_exists('customTables') ? customTables() : []; |
| 265 | + $custom_fields = function_exists('customFields') ? customFields() : []; |
251 | 266 |
|
252 | | - $custom_views_not_standard = customViewsNotStandard(); |
253 | | - $custom_modules_not_standard = customModulesNotStandard(); |
| 267 | + $custom_views_not_standard = function_exists('customViewsNotStandard') ? customViewsNotStandard() : []; |
| 268 | + $custom_modules_not_standard = function_exists('customModulesNotStandard') ? customModulesNotStandard() : []; |
254 | 269 |
|
255 | 270 | // Determina se ci sono errori per ogni sezione |
256 | 271 | $has_file_errors = !empty($custom_files); |
@@ -652,19 +667,7 @@ function highlightDifferences($current, $expected) |
652 | 667 | } |
653 | 668 | } |
654 | 669 |
|
655 | | -if (!function_exists('base_path')) { |
656 | | - function base_path() |
657 | | - { |
658 | | - return ROOTDIR; |
659 | | - } |
660 | | -} |
661 | 670 |
|
662 | | -if (!function_exists('base_dir')) { |
663 | | - function base_dir() |
664 | | - { |
665 | | - return DOCROOT; |
666 | | - } |
667 | | -} |
668 | 671 |
|
669 | 672 | $alerts = []; |
670 | 673 |
|
|
0 commit comments