Skip to content

Commit c90c317

Browse files
committed
feat: Aggiunta impostazione per nascondere il numero totale dei record delle tabelle
1 parent 4d9c03e commit c90c317

3 files changed

Lines changed: 13 additions & 3 deletions

File tree

ajax_dataload.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@
6262
$query = Query::getQuery($structure, [], [], [], $total);
6363
if (!empty($query)) {
6464
// CONTEGGIO TOTALE
65-
$results['recordsTotal'] = $dbo->fetchNum($query);
65+
if (!setting('Nascondere il valore totale dei record delle tabelle')) {
66+
$results['recordsTotal'] = $dbo->fetchNum($query);
67+
}
6668

6769
// CONTEGGIO RECORD FILTRATI (senza LIMIT)
6870
$query_filtered = Query::getQuery($structure, $search, $order, [], $total);

include/top.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@
203203
"emptyTable": "'.tr('Nessun dato presente nella tabella').'",
204204
"info": "'.tr('_TOTAL_ elementi').'",
205205
"infoEmpty": "'.tr('Nessun risultato').'",
206-
"infoFiltered": "('.tr('_MAX_ totali').')",
206+
"infoFiltered": "'.(setting('Nascondere il valore totale dei record delle tabelle') ? '' : tr('(_TOTAL_ totali)')).'",
207207
"infoPostFix": "",
208208
"lengthMenu": "'.tr('Visualizza _MENU_ elementi').'",
209209
"loadingRecords": " ",

update/2_10.sql

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,4 +416,12 @@ ALTER TABLE `dt_righe_ddt` ADD `sconto_percentuale_combinato` VARCHAR(255) NULL
416416
ALTER TABLE `in_righe_interventi` CHANGE `tipo_sconto` `tipo_sconto` ENUM('UNT','PRC','PRC+') NOT NULL DEFAULT 'UNT';
417417
ALTER TABLE `in_righe_interventi` ADD `sconto_percentuale_combinato` VARCHAR(255) NULL AFTER `sconto_percentuale`;
418418
ALTER TABLE `or_righe_ordini` CHANGE `tipo_sconto` `tipo_sconto` ENUM('UNT','PRC','PRC+') NOT NULL DEFAULT 'UNT';
419-
ALTER TABLE `or_righe_ordini` ADD `sconto_percentuale_combinato` VARCHAR(255) NULL AFTER `sconto_percentuale`;
419+
ALTER TABLE `or_righe_ordini` ADD `sconto_percentuale_combinato` VARCHAR(255) NULL AFTER `sconto_percentuale`;
420+
421+
-- Nascondere totali tabelle
422+
INSERT INTO `zz_settings` (`nome`, `valore`, `tipo`, `editable`, `sezione`) VALUES
423+
('Nascondere il valore totale dei record delle tabelle', '1', 'boolean', 1, 'Generali');
424+
425+
INSERT INTO `zz_settings_lang` (`id_lang`, `id_record`, `title`, `help`) VALUES
426+
(1, (SELECT MAX(`id`) FROM `zz_settings`), 'Nascondere il valore totale dei record delle tabelle', ''),
427+
(2, (SELECT MAX(`id`) FROM `zz_settings`), 'Hide total value of records in tables', '');

0 commit comments

Comments
 (0)