Correzioni minori

Correzioni minori
This commit is contained in:
Dasc3er 2021-03-13 14:10:34 +01:00 committed by Thomas Zilio
parent 2430ddd0b6
commit 0ede10ce75
4 changed files with 12 additions and 3 deletions

View File

@ -41,6 +41,7 @@ function initNumberInput(input) {
let max = $input.attr('max-value') && $input.attr('max-value') !== "undefined" ? $input.attr('max-value') : null; 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; let decimals = $input.attr('decimals') ? $input.attr('decimals') : globals.cifre_decimali;
decimals = decimals ? decimals : 2; // Cifre decimali di fallback
let autonumeric = new AutoNumeric(input, { let autonumeric = new AutoNumeric(input, {
caretPositionOnFocus: "decimalLeft", caretPositionOnFocus: "decimalLeft",

View File

@ -139,7 +139,7 @@ function formatter()
{ {
if (!app()->has(Formatter::class)) { if (!app()->has(Formatter::class)) {
$formatter = new Formatter( $formatter = new Formatter(
app()->getLocale(), locale(),
empty($options['timestamp']) ? 'd/m/Y H:i' : $options['timestamp'], empty($options['timestamp']) ? 'd/m/Y H:i' : $options['timestamp'],
empty($options['date']) ? 'd/m/Y' : $options['date'], empty($options['date']) ? 'd/m/Y' : $options['date'],
empty($options['time']) ? 'H:i' : $options['time'], empty($options['time']) ? 'H:i' : $options['time'],

View File

@ -551,7 +551,7 @@ class Update
* *
* @return string * @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; $file = (string_contains($file, base_dir().DIRECTORY_SEPARATOR)) ? $file : base_dir().DIRECTORY_SEPARATOR.$file;

View File

@ -39,6 +39,14 @@ class Zip
return extension_loaded('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. * Estrae i contenuti di un file ZIP in una cartella temporanea.
* *
@ -58,7 +66,7 @@ class Zip
} }
// Percorso di estrazione // Percorso di estrazione
$extraction_dir = !empty($destination) ? $destination : base_dir().'/tmp'; $extraction_dir = !empty($destination) ? $destination : self::getExtractionDirectory();
directory($extraction_dir); directory($extraction_dir);
// Estrazione dell'archivio // Estrazione dell'archivio