From 74b9868766f33cf42352c78cd0426cc39db87417 Mon Sep 17 00:00:00 2001 From: Thomas Zilio Date: Wed, 1 Aug 2018 15:32:23 +0200 Subject: [PATCH] Fix get_var --- modules/ddt/bulk.php | 2 +- modules/interventi/add.php | 2 +- modules/interventi/api/create.php | 2 +- src/API.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/ddt/bulk.php b/modules/ddt/bulk.php index 8c62c11ef..556b52fee 100644 --- a/modules/ddt/bulk.php +++ b/modules/ddt/bulk.php @@ -12,7 +12,7 @@ switch (post('op')) { // Informazioni della fattura $tipo_documento = $dbo->selectOne('co_tipidocumento', 'id', ['descrizione' => 'Fattura immediata di vendita'])['id']; $dir = 'entrata'; - $idiva = get_var('Iva predefinita'); + $idiva = setting('Iva predefinita'); $data = date('Y-m-d'); // Segmenti diff --git a/modules/interventi/add.php b/modules/interventi/add.php index 67b547560..df624302c 100644 --- a/modules/interventi/add.php +++ b/modules/interventi/add.php @@ -114,7 +114,7 @@ $idintervento_template = str_replace('#', '%', $idintervento_template); // Calcolo codice intervento successivo $rs = $dbo->fetchArray('SELECT codice FROM in_interventi WHERE codice=(SELECT MAX(CAST(codice AS SIGNED)) FROM in_interventi) AND codice LIKE '.prepare($idintervento_template).' ORDER BY codice DESC LIMIT 0,1'); if (!empty($rs[0]['codice'])) { - $new_codice = Util\Generator::generate(get_var('Formato codice intervento'), $rs[0]['codice']); + $new_codice = Util\Generator::generate(setting('Formato codice intervento'), $rs[0]['codice']); } if (empty($new_codice)) { diff --git a/modules/interventi/api/create.php b/modules/interventi/api/create.php index c07652100..f9520d6b5 100644 --- a/modules/interventi/api/create.php +++ b/modules/interventi/api/create.php @@ -7,7 +7,7 @@ switch ($resource) { $data = $request['data']; // Se l'idintervento non esiste, creo un nuovo intervento - $formato = get_var('Formato codice intervento'); + $formato = setting('Formato codice intervento'); $template = str_replace('#', '%', $formato); $rs = $dbo->fetchArray('SELECT codice FROM in_interventi WHERE codice=(SELECT MAX(CAST(codice AS SIGNED)) FROM in_interventi) AND codice LIKE '.prepare($template).' ORDER BY codice DESC LIMIT 0,1'); diff --git a/src/API.php b/src/API.php index 1a75179fd..032925b20 100644 --- a/src/API.php +++ b/src/API.php @@ -208,7 +208,7 @@ class API extends \Util\Singleton { $user = Auth::user(); $results = []; - + // Controllo sulla compatibilità dell'API if (!self::isCompatible()) { return self::response([