Skip to content

Commit 784271a

Browse files
committed
fix: aggiornamento
1 parent 3a43ac2 commit 784271a

1 file changed

Lines changed: 20 additions & 17 deletions

File tree

modules/aggiornamenti/edit.php

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,21 @@
2121
include_once __DIR__.'/../../core.php';
2222
include_once __DIR__.'/modutil.php';
2323

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+
2439
use Models\Module;
2540

2641
// Inizializzazione del modulo corrente
@@ -245,12 +260,12 @@ function highlightDifferences($current, $expected)
245260

246261
if (function_exists('customComponents')) {
247262
$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() : [];
251266

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() : [];
254269

255270
// Determina se ci sono errori per ogni sezione
256271
$has_file_errors = !empty($custom_files);
@@ -652,19 +667,7 @@ function highlightDifferences($current, $expected)
652667
}
653668
}
654669

655-
if (!function_exists('base_path')) {
656-
function base_path()
657-
{
658-
return ROOTDIR;
659-
}
660-
}
661670

662-
if (!function_exists('base_dir')) {
663-
function base_dir()
664-
{
665-
return DOCROOT;
666-
}
667-
}
668671

669672
$alerts = [];
670673

0 commit comments

Comments
 (0)