diff --git a/modules/aggiornamenti/actions.php b/modules/aggiornamenti/actions.php index b8a872537..6424cbf1c 100755 --- a/modules/aggiornamenti/actions.php +++ b/modules/aggiornamenti/actions.php @@ -44,7 +44,11 @@ switch (filter('op')) { break; case 'upload': - include base_dir().'/modules/aggiornamenti/upload_modules.php'; + if (setting('Attiva aggiornamenti')){ + include base_dir().'/modules/aggiornamenti/upload_modules.php'; + }else{ + flash()->error(tr('Non รจ permesso il caricamento di aggiornamenti o moduli!')); + } break; diff --git a/modules/aggiornamenti/edit.php b/modules/aggiornamenti/edit.php index 28225fde5..ae895e18b 100755 --- a/modules/aggiornamenti/edit.php +++ b/modules/aggiornamenti/edit.php @@ -92,7 +92,6 @@ if (!function_exists('base_dir')) { } // Aggiornamenti -if (setting('Attiva aggiornamenti')) { $alerts = []; if (!extension_loaded('zip')) { @@ -184,19 +183,22 @@ function search(button) { } -
+
'; + + +echo'

- '.tr('Carica un aggiornamento').' + '.tr('Carica aggiornamenti o nuovi moduli').'

- {[ "type": "file", "name": "blob", "required": 1, "accept": ".zip" ]} + {[ "type": "file", "name": "blob", "required": 1, "accept": ".zip", "disabled": '.(setting('Attiva aggiornamenti')? 0 : 1).' ]} '; @@ -218,12 +220,16 @@ echo ' + '; + +echo '
-
+
'; + +echo '
@@ -245,7 +251,9 @@ echo '
-
+
'; + +echo '
@@ -265,11 +273,12 @@ echo ' '; } - echo '
+echo '
- + '; + +echo ' '; -} // Requisiti echo '