Skip to content

Commit ec58816

Browse files
committed
fix: aggiornamento
1 parent b92d43c commit ec58816

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
@@ -180,12 +195,12 @@ function highlightDifferences($current, $expected) {
180195

181196
if (function_exists('customComponents')) {
182197
$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() : [];
186201

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

190205
// Determina se ci sono errori per ogni sezione
191206
$has_file_errors = !empty($custom_files);
@@ -608,19 +623,7 @@ function highlightDifferences($current, $expected) {
608623
}
609624
}
610625

611-
if (!function_exists('base_path')) {
612-
function base_path()
613-
{
614-
return ROOTDIR;
615-
}
616-
}
617626

618-
if (!function_exists('base_dir')) {
619-
function base_dir()
620-
{
621-
return DOCROOT;
622-
}
623-
}
624627

625628
$alerts = [];
626629

0 commit comments

Comments
 (0)