| @@ -81,10 +81,13 @@ | ||
| 81 | 81 | if ( ( isset( $_GET['reset'] ) ) && ( 'custom_forms' == $_GET['reset'] ) ) { // FixIn: 8.1.3.21. |
| 82 | 82 | |
| 83 | 83 | wpbc_open_meta_box_section( 'wpbc_general_settings_system_info', 'System Info' ); |
| 84 | 84 | |
| 85 | - // Reset Custom Booking Forms to NONE | |
| 86 | - update_bk_option( 'booking_forms_extended', serialize( array() ) ); | |
| 85 | + global $wpdb; | |
| 86 | + if ( function_exists( 'wpbc_is_table_exists' ) && wpbc_is_table_exists( 'booking_form_structures' ) ) { | |
| 87 | + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared | |
| 88 | + $wpdb->query( "DELETE FROM {$wpdb->prefix}booking_form_structures WHERE form_slug <> 'standard'" ); | |
| 89 | + } | |
| 87 | 90 | |
| 88 | 91 | wpbc_show_message_in_settings( '<strong>Custom forms</strong> has been reseted!', 'info' ); |
| 89 | 92 | |
| 90 | 93 | wpbc_close_meta_box_section(); |
| @@ -100,8 +103,10 @@ | ||
| 100 | 103 | * |
| 101 | 104 | */ |
| 102 | 105 | function wpbc_settings__system_info__generate_php_from_pot() { |
| 103 | 106 | |
| 107 | + return; | |
| 108 | + | |
| 104 | 109 | if ( ! current_user_can( 'activate_plugins' ) ) { |
| 105 | 110 | return; |
| 106 | 111 | } |
| 107 | 112 | |
| @@ -213,14 +218,14 @@ | ||
| 213 | 218 | // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing |
| 214 | 219 | if ( ( isset( $_GET['restore_dismissed'] ) ) && ( $_GET['restore_dismissed'] == 'On' ) ) { // FixIn: 8.1.3.10. |
| 215 | 220 | |
| 216 | 221 | update_bk_option( 'booking_is_show_powered_by_notice', 'On' ); |
| 217 | - | |
| 218 | 222 | update_bk_option( 'booking_wpdev_copyright_adminpanel', 'On' ); |
| 223 | + update_bk_option( 'booking_menu_go_pro', 'show' ); | |
| 219 | 224 | |
| 220 | 225 | global $wpdb; |
| 221 | 226 | |
| 222 | - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared | |
| 227 | + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared, PluginCheck.Security.DirectDB.UnescapedDBParameter | |
| 223 | 228 | if ( false === $wpdb->query( "DELETE FROM {$wpdb->usermeta} WHERE meta_key LIKE '%booking_win_%'" ) ) { // Delete all users booking windows states. |
| 224 | 229 | debuge_error( 'Error during deleting user meta at DB', __FILE__, __LINE__ ); |
| 225 | 230 | die(); |
| 226 | 231 | } else { |
| @@ -249,9 +254,9 @@ | ||
| 249 | 254 | global $wpdb, $wp_version; |
| 250 | 255 | |
| 251 | 256 | $all_plugins = get_plugins(); |
| 252 | 257 | $active_plugins = get_option( 'active_plugins' ); |
| 253 | - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared | |
| 258 | + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared, PluginCheck.Security.DirectDB.UnescapedDBParameter | |
| 254 | 259 | $mysql_info = $wpdb->get_results( "SHOW VARIABLES LIKE 'sql_mode'" ); |
| 255 | 260 | |
| 256 | 261 | if ( is_array( $mysql_info ) ) $sql_mode = $mysql_info[0]->Value; |
| 257 | 262 | if ( empty( $sql_mode ) ) $sql_mode = 'Not set'; |
| @@ -283,9 +288,9 @@ | ||
| 283 | 288 | |
| 284 | 289 | $ver_small_name = wpbc_get_plugin_version_type(); |
| 285 | 290 | if ( class_exists( 'wpdev_bk_multiuser' ) ) $ver_small_name = 'multiuser'; |
| 286 | 291 | |
| 287 | - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared | |
| 292 | + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared, PluginCheck.Security.DirectDB.UnescapedDBParameter | |
| 288 | 293 | $mysql_version = $wpdb->get_var( 'SELECT VERSION() AS version' ); |
| 289 | 294 | |
| 290 | 295 | $system_info['system_info'] = array( |
| 291 | 296 | 'Plugin Update' => ( defined( 'WPDEV_BK_VERSION' ) ) ? WPDEV_BK_VERSION : 'N/A', |