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-trash.php +7 -2 10.1111.8.4 View file →
@@ -910,9 +910,14 @@
910 910 $replace[ 'check_in_only_date' ] = $my_check_in_onlydate;
911 911 $replace[ 'check_out_only_date' ] = $my_check_out_onlydate;
912 912
913 913 $replace[ 'check_out_plus1day'] = $my_check_out_plus1day; // FixIn: 6.0.1.11.
914 - $replace[ 'dates_count' ] = count( $my_dates4emeil_check_in_out );
914 +
915 + $replace['dates_count'] = count( $my_dates4emeil_check_in_out );
916 + $replace['days_count'] = intval( $replace['dates_count'] ); // FixIn: 10.15.1.3.
917 + $replace['nights_count'] = ( $replace['days_count'] > 1 ) ? intval( $replace['days_count'] - 1 ) : 1;
918 + $replace['days_count_plus1day'] = intval( $replace['days_count'] + 1 );
919 +
915 920 $replace['cost'] = $booking_cost;
916 921 $replace['cost_digits_only'] = $booking_cost_digits_only;
917 922 $replace[ 'siteurl' ] = htmlspecialchars_decode( '<a href="' . esc_url( home_url() ) . '">' . home_url() . '</a>' );
918 923 $replace[ 'resource_title'] = wpbc_lang( $bk_title );
@@ -970,9 +975,9 @@
970 975 function wpbc_send_email_trash( $trash_id_str, $is_send_emeils, $trashreason = '' ) {
971 976
972 977 global $wpdb;
973 978 $sql = "SELECT * FROM {$wpdb->prefix}booking as bk WHERE bk.booking_id IN ({$trash_id_str})";
974 - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared
979 + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared, PluginCheck.Security.DirectDB.UnescapedDBParameter, PluginCheck.Security.DirectDB.UnescapedDBParameter
975 980 $result = $wpdb->get_results( $sql );
976 981
977 982
978 983 foreach ( $result as $res ) {