diff --git a/assets/src/js/functions/numbers.js b/assets/src/js/functions/numbers.js index 4ad9bce88..2e753ab73 100644 --- a/assets/src/js/functions/numbers.js +++ b/assets/src/js/functions/numbers.js @@ -41,6 +41,7 @@ function initNumberInput(input) { let max = $input.attr('max-value') && $input.attr('max-value') !== "undefined" ? $input.attr('max-value') : null; let decimals = $input.attr('decimals') ? $input.attr('decimals') : globals.cifre_decimali; + decimals = decimals ? decimals : 2; // Cifre decimali di fallback let autonumeric = new AutoNumeric(input, { caretPositionOnFocus: "decimalLeft", diff --git a/lib/helpers.php b/lib/helpers.php index 5be45b7f7..1c4a34327 100755 --- a/lib/helpers.php +++ b/lib/helpers.php @@ -139,7 +139,7 @@ function formatter() { if (!app()->has(Formatter::class)) { $formatter = new Formatter( - app()->getLocale(), + locale(), empty($options['timestamp']) ? 'd/m/Y H:i' : $options['timestamp'], empty($options['date']) ? 'd/m/Y' : $options['date'], empty($options['time']) ? 'H:i' : $options['time'], diff --git a/src/Update.php b/src/Update.php index 03c596d08..a70ec2bda 100755 --- a/src/Update.php +++ b/src/Update.php @@ -551,7 +551,7 @@ class Update * * @return string */ - protected static function getFile($file) + public static function getFile($file) { $file = (string_contains($file, base_dir().DIRECTORY_SEPARATOR)) ? $file : base_dir().DIRECTORY_SEPARATOR.$file; diff --git a/src/Util/Zip.php b/src/Util/Zip.php index a1ca7a7ec..592668757 100755 --- a/src/Util/Zip.php +++ b/src/Util/Zip.php @@ -39,6 +39,14 @@ class Zip return extension_loaded('zip'); } + /** + * @return string + */ + public static function getExtractionDirectory() + { + return base_path().'/tmp'; + } + /** * Estrae i contenuti di un file ZIP in una cartella temporanea. * @@ -58,7 +66,7 @@ class Zip } // Percorso di estrazione - $extraction_dir = !empty($destination) ? $destination : base_dir().'/tmp'; + $extraction_dir = !empty($destination) ? $destination : self::getExtractionDirectory(); directory($extraction_dir); // Estrazione dell'archivio