| @@ -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 ) { |