Skip to content

Commit

Permalink
v8.0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
milesimarco committed Oct 2, 2023
1 parent c76d734 commit ffb7d7a
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 17 deletions.
2 changes: 1 addition & 1 deletion amministrazionetrasparente.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Amministrazione Trasparente
Plugin URI: https://wordpress.org/plugins/amministrazione-trasparente/
Description: Soluzione completa per la pubblicazione online dei documenti ai sensi del D.lgs. n. 33 del 14/03/2013
Version: 8.0.5
Version: 8.0.10
Author: Marco Milesi
Author Email: [email protected]
Author URI: https://www.marcomilesi.com
Expand Down
8 changes: 6 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
Tags: amministrazione, aperta, trasparente, documenti, atti, spese, comuni, pa, amministrazioni, locali, pubblicazione, online, imprese, enti, scuola, università, comunità, montana, valle, modulo, software, gratuito, disposizioni, obbligo, legge, comune, modulo, decreto, 14 marzo, 2013, sovvenzioni, pubblici, pubblico, marco, milesi
Requires at least: 4.2
Tested up to: 6.3
Version: 8.0.5
Stable tag: 8.0.5
Version: 8.0.10
Stable tag: 8.0.10
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -51,6 +51,10 @@ Puoi trovare la documentazione su [docs.wpgov.it](https://docs.wpgov.it/docs/cat
== Changelog ==
> Questa è la lista completa di tutti gli aggiornamenti, test e correzioni. Ogni volta che una nuova versione viene rilasciata assicuratevi di aggiornare il prima possibile per usufruire delle ultime migliorie!

= 8.0.10 20231003 =
* Corretto bug di mancata inizializzazione su nuove installazioni
* Correzioni e miglioramenti gestione impostazioni

= 8.0.5 20230830 =
* Fixed security bug - CVSS 3.1
* Aggiunta data di ultima modifica nella lista amministrativa per il custom post type amm-trasparente
Expand Down
35 changes: 23 additions & 12 deletions settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,24 @@ function at_setting_tabs( $id ) {
at_setting_tabs( 2 );

echo '<pre>';
$e = filter_var_array( get_option('wpgov_at'), FILTER_SANITIZE_SPECIAL_CHARS);
print_r( $e );
$a = get_option('wpgov_at');
if ( is_array( $a ) ) {
$e = filter_var_array( get_option('wpgov_at'), FILTER_SANITIZE_SPECIAL_CHARS);
print_r( $e );
} else {
echo 'Nessuna impostazione presente';
}
echo '</pre>';

echo '<pre>';
$e = filter_var_array( get_option('atGroupConf'), FILTER_SANITIZE_SPECIAL_CHARS);
print_r( $e );
echo '</pre>';
$a = get_option('atGroupConf');
if ( is_array( $a ) ) {
$e = filter_var_array( $a, FILTER_SANITIZE_SPECIAL_CHARS);
print_r( $e );
} else {
echo 'Nessuna configurazione presente';
}
echo '</pre>';

} else if ( isset($_GET['at_action']) ) {

Expand All @@ -73,7 +83,6 @@ function at_setting_tabs( $id ) {
$selected_sections = array_merge( $selected_sections, $arrayTipologie );
$selected_sections_unique = array_unique( array_merge( $selected_sections, $arrayTipologie ) );
}
#array_walk_recursive( at_getGroupConf(), function($a) use ($selected_sections) { $selected_sections[] = $a; });
}

$diff = array_diff_assoc($selected_sections, array_unique($selected_sections) );
Expand All @@ -92,11 +101,14 @@ function at_setting_tabs( $id ) {
foreach( $atTerms as $term ) {
if ( !in_array( $term->term_id, $selected_sections_unique ) ) {
$alert_count .= '- '.esc_js($term->name) . '\n';
$max = max( array_keys( $selected_sections_unique ) );
$selected_sections_unique[ ++$max ] = $term->term_id;
if ( !empty( $selected_sections_unique) ) {
$max = max( array_keys( $selected_sections_unique ) );
$selected_sections_unique[ ++$max ] = $term->term_id;
}

}
}
$warning_count = '<b style="color:red;">[Attenzione: '.(wp_count_terms( 'tipologie' ) - count( $selected_sections ) ).' tipologie non sono associate a un gruppo - <a href="#" onclick="alert(\''.$alert_count.'\');">Clicca qui per i dettagli</a>]</b>';
$warning_count = '<b style="color:red;">[Attenzione: '.(wp_count_terms( 'tipologie' ) - count( array_count_values( $selected_sections ) ) ).' tipologie non sono associate a un gruppo - <a href="#" onclick="alert(\''.$alert_count.'\');">Clicca qui per i dettagli</a>]</b>';
} else {
$warning_count = '<b style="color:green">[OK]</b>';
}
Expand All @@ -122,8 +134,7 @@ function at_setting_tabs( $id ) {
submit_button();

foreach ( at_get_taxonomy_groups() as $group ) {
echo '<details style="margin:30px;"><summary><b>'.$group.'</b>';

echo '<details style="margin:10px;"><summary style="margin: 10px;"><b>'.$group.'</b>';
$sezione = at_getGroupConf( sanitize_title( $group ) );
echo ' ('.count($sezione).')';
echo '</summary>';
Expand All @@ -144,7 +155,7 @@ function at_setting_tabs( $id ) {
echo $dropdownOptionsEcho;
echo '</select>';

echo '<script>jQuery("#'.sanitize_title( $group ).'").multiSelect( { keepOrder: true });</script>';
echo '<script>jQuery("#'.sanitize_title( $group ).'").multiSelect( { keepOrder: true, selectableHeader: "Disponibili:", selectionHeader: "Attive in questa sezione:" } );</script>';
echo '</div>';
echo '</details>';
}
Expand Down
3 changes: 1 addition & 2 deletions updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ function at_install_upgrade() {
}
at_generate_desc();
}
if ( get_option('at_version_number') && version_compare( get_option('at_version_number'), 8, '<') ) {

if ( empty( get_option('atGroupConf') ) ) {
$settings_default = array();
foreach (amministrazionetrasparente_getarray() as $inner) {
if ( !isset( $settings_default[ sanitize_title( $inner[0] ) ] ) ) {
Expand Down

0 comments on commit ffb7d7a

Please sign in to comment.