PluginProbe
Booking Calendar / 11.8.4
Booking Calendar v11.8.4
11.8.4 11.8.3 11.8.2 11.8.1 11.8 11.7 11.6.1 11.6 11.5 11.4.3 11.4.2 11.4.1 11.4 11.3 11.2.1 11.2 11.1 11.0 10.15.7 10.15.6 10.1.3 10.10 10.10.1 10.10.2 10.11 All 204 releases
← All changes | core/admin/page-email-deleted.php +8 -2 10.1111.8.4 View file →
@@ -902,9 +902,15 @@
902 902 $replace[ 'check_in_only_date' ] = $my_check_in_onlydate;
903 903 $replace[ 'check_out_only_date' ] = $my_check_out_onlydate;
904 904
905 905 $replace[ 'check_out_plus1day'] = $my_check_out_plus1day; // FixIn: 6.0.1.11.
906 - $replace[ 'dates_count' ] = count( $my_dates4emeil_check_in_out );
906 +
907 + $replace['dates_count'] = count( $my_dates4emeil_check_in_out );
908 + $replace['days_count'] = intval( $replace['dates_count'] ); // FixIn: 10.15.1.3.
909 + $replace['nights_count'] = ( $replace['days_count'] > 1 ) ? intval( $replace['days_count'] - 1 ) : 1;
910 + $replace['days_count_plus1day'] = intval( $replace['days_count'] + 1 );
911 +
912 +
907 913 $replace['cost'] = $booking_cost;
908 914 $replace['cost_digits_only'] = $booking_cost_digits_only;
909 915 $replace[ 'siteurl' ] = htmlspecialchars_decode( '<a href="' . esc_url( home_url() ) . '">' . home_url() . '</a>' );
910 916 $replace[ 'resource_title'] = wpbc_lang( $bk_title );
@@ -962,9 +968,9 @@
962 968 function wpbc_send_email_deleted( $deleted_id_str, $is_send_emeils, $deletedreason = '' ) {
963 969
964 970 global $wpdb;
965 971 $sql = "SELECT * FROM {$wpdb->prefix}booking as bk WHERE bk.booking_id IN ({$deleted_id_str})";
966 - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared
972 + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared, PluginCheck.Security.DirectDB.UnescapedDBParameter
967 973 $result = $wpdb->get_results( $sql );
968 974
969 975 foreach ( $result as $res ) {
970 976