From ee55dc7f72d66c158a7779d1b0ab2ecc712c5718 Mon Sep 17 00:00:00 2001 From: sharevb Date: Sat, 9 Nov 2024 14:20:51 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20wp=5Fmail,=20concat=20"to",=20"cc",=20"b?= =?UTF-8?q?cc"=20avec=20virgule=20sans=20espace=20(semble=20perturber=20ce?= =?UTF-8?q?tte=20version=20de=20WordPress=20ou=20h=C3=A9bergeur=20ou=20Wor?= =?UTF-8?q?dFence)=20+=20fix=20nominatim=20partial=20empty=20+=20undef=20v?= =?UTF-8?q?ar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 12 ++++++++++++ amapress.php | 10 +++++----- entities/distribution/actions.php | 2 +- titan-framework/lib/class-option-address.php | 2 +- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fef6334..ce72bb5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +# 0.99.285 (2024-11-09) + +* contrat vierge placeholders status quand pas de contrat papier défini +* placeholder status "total_avec/sans_don" +* Nominatim empty response and other fix +* wp_mail, concat "to", "cc", "bcc" avec virgule sans espace (semble perturber cette version de WordPress ou hébergeur + ou WordFence) + +# 0.99.283 (2024-10-27) + +* affichage des livraisons d'une adhésion passée + # 0.99.282 (2024-10-14) * meilleure interface d'édition des paniers modulables diff --git a/amapress.php b/amapress.php index 8f7f5dfc..fbe60525 100644 --- a/amapress.php +++ b/amapress.php @@ -9,7 +9,7 @@ * Plugin Name: Amapress * Plugin URI: https://github.com/comptoirdesappli/amapress * Description: Plugin de Gestion & Communication pour les AMAP - * Version: 0.99.283 + * Version: 0.99.285 * Requires PHP: 5.6 * Requires at least: 4.6 * Author: Comptoir des Applis @@ -53,7 +53,7 @@ define( 'AMAPRESS__PLUGIN_FILE', __FILE__ ); define( 'AMAPRESS_DELETE_LIMIT', 100000 ); define( 'AMAPRESS_DB_VERSION', 112 ); -define( 'AMAPRESS_VERSION', '0.99.283' ); +define( 'AMAPRESS_VERSION', '0.99.285' ); define( 'AMAPRESS_MAIL_QUEUE_DEFAULT_INTERVAL', 60 ); define( 'AMAPRESS_MAIL_QUEUE_DEFAULT_LIMIT', 4 ); @@ -129,7 +129,7 @@ function amapress_wp_mail( $to, $subject, $message, $headers = '', $attachments return false; } if ( is_array( $to ) ) { - $to = implode( ', ', $to ); + $to = implode( ',', $to ); } if ( empty( $headers ) ) { $headers = array(); @@ -156,7 +156,7 @@ function ( $h ) { return 0 !== stripos( $h, 'Cc' ); } ); if ( is_array( $cc ) ) { - $headers[] = 'Cc:' . implode( ', ', $cc ); + $headers[] = 'Cc:' . implode( ',', $cc ); } else { $headers[] = 'Cc:' . $cc; } @@ -167,7 +167,7 @@ function ( $h ) { return 0 !== stripos( $h, 'Bcc' ); } ); if ( is_array( $bcc ) ) { - $headers[] = 'Bcc:' . implode( ', ', $bcc ); + $headers[] = 'Bcc:' . implode( ',', $bcc ); } else { $headers[] = 'Bcc:' . $bcc; } diff --git a/entities/distribution/actions.php b/entities/distribution/actions.php index c9f64fe2..78de22b0 100644 --- a/entities/distribution/actions.php +++ b/entities/distribution/actions.php @@ -725,7 +725,7 @@ function ( $adh ) use ( $date, $allow_partial_coadh ) { echo esc_html( sprintf( __( 'Responsables du jour - %s', 'amapress' ), $lieu->getTitle() ) ); echo ''; // echo '
'; - echo do_shortcode( '[inscription-distrib show_title=false for_emargement=true for_pdf=' . $for_pdf . ' show_past=false show_for_resp=true max_dates=1 show_adresse=false show_avatar=' . ( $for_pdf ? 0 : 1 ) . ' show_roles=false date=' . $from_date . ' lieu=' . $lieu_id . ']' ); + echo do_shortcode( '[inscription-distrib show_title=false for_emargement=true for_pdf=' . $for_pdf . ' show_past=false show_for_resp=true max_dates=1 show_adresse=false show_avatar=' . ( $for_pdf ? 0 : 1 ) . ' show_roles=false date=' . $from_date . ' lieu=' . $lieu->ID . ']' ); } } diff --git a/titan-framework/lib/class-option-address.php b/titan-framework/lib/class-option-address.php index ab32a726..70996c5b 100644 --- a/titan-framework/lib/class-option-address.php +++ b/titan-framework/lib/class-option-address.php @@ -74,7 +74,7 @@ public static function lookup_address( $string ) { $response = json_decode( wp_remote_retrieve_body( $request ), true ); - if ( ! is_array( $response ) || empty( $response ) ) { + if ( ! is_array( $response ) || empty( $response ) || empty( $response[0] ) ) { error_log( "Nominatim resolution failed: $details_url" ); return null;