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-approved.php +8 -2 10.1111.8.4 View file →
@@ -907,9 +907,15 @@
907 907 $replace[ 'check_in_only_date' ] = $my_check_in_onlydate;
908 908 $replace[ 'check_out_only_date' ] = $my_check_out_onlydate;
909 909
910 910 $replace[ 'check_out_plus1day'] = $my_check_out_plus1day; // FixIn: 6.0.1.11.
911 - $replace[ 'dates_count' ] = count( $my_dates4emeil_check_in_out );
911 +
912 + $replace['dates_count'] = count( $my_dates4emeil_check_in_out );
913 + $replace['days_count'] = intval( $replace['dates_count'] ); // FixIn: 10.15.1.3.
914 + $replace['nights_count'] = ( $replace['days_count'] > 1 ) ? intval( $replace['days_count'] - 1 ) : 1;
915 + $replace['days_count_plus1day'] = intval( $replace['days_count'] + 1 );
916 +
917 +
912 918 $replace['cost'] = $booking_cost;
913 919 $replace['cost_digits_only'] = $booking_cost_digits_only;
914 920 $replace[ 'siteurl' ] = htmlspecialchars_decode( '<a href="' . esc_url( home_url() ) . '">' . home_url() . '</a>' );
915 921 $replace[ 'resource_title'] = wpbc_lang( $bk_title );
@@ -986,9 +992,9 @@
986 992 function wpbc_send_email_approved( $approved_id_str, $is_send_emeils, $denyreason = '' ) {
987 993
988 994 global $wpdb;
989 995 $sql = "SELECT * FROM {$wpdb->prefix}booking as bk WHERE bk.booking_id IN ({$approved_id_str})";
990 - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared
996 + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared, PluginCheck.Security.DirectDB.UnescapedDBParameter
991 997 $result = $wpdb->get_results( $sql );
992 998
993 999 foreach ( $result as $res ) {
994 1000