Skip to content

Commit

Permalink
changes all variables
Browse files Browse the repository at this point in the history
  • Loading branch information
davidperezgar committed Jan 23, 2025
1 parent 86ce816 commit 28e4fef
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions includes/Checker/Runtime_Environment_Setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ final class Runtime_Environment_Setup {
* @since 1.0.0
*
* @global wpdb $wpdb WordPress database abstraction object.
* @global string $table_prefix The database table prefix.
* @global string $base_prefix The database table prefix.
* @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
*/
public function set_up() {
global $wpdb, $table_prefix, $wp_filesystem;
global $wpdb, $base_prefix, $wp_filesystem;

require_once ABSPATH . '/wp-admin/includes/upgrade.php';

Expand All @@ -41,7 +41,7 @@ public function set_up() {
$permalink_structure = get_option( 'permalink_structure' );

// Set the new prefix.
$old_prefix = $wpdb->set_prefix( $table_prefix . 'pc_' );
$old_prefix = $wpdb->set_prefix( $base_prefix . 'pc_' );

// Create and populate the test database tables if they do not exist.
if ( $wpdb->posts !== $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->posts ) ) ) {
Expand Down Expand Up @@ -98,7 +98,7 @@ static function () use ( $permalink_structure ) {
* @since 1.0.0
*
* @global wpdb $wpdb WordPress database abstraction object.
* @global string $table_prefix The database table prefix.
* @global string $base_prefix The database table prefix.
* @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
*/
public function clean_up() {
Expand Down Expand Up @@ -146,19 +146,19 @@ public function clean_up() {
* @since 1.3.0
*
* @global wpdb $wpdb WordPress database abstraction object.
* @global string $table_prefix The database table prefix.
* @global string $base_prefix The database table prefix.
*
* @return bool True if the runtime environment is set up, false if not.
*/
public function is_set_up() {
global $wpdb, $table_prefix;
global $wpdb, $base_prefix;

if ( defined( 'WP_PLUGIN_CHECK_OBJECT_CACHE_DROPIN_VERSION' ) ) {
return true;
}

// Set the custom prefix to check for the runtime environment tables.
$old_prefix = $wpdb->set_prefix( $table_prefix . 'pc_' );
$old_prefix = $wpdb->set_prefix( $base_prefix . 'pc_' );

$tables_present = $wpdb->posts === $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->posts ) );

Expand Down

0 comments on commit 28e4fef

Please sign in to comment.