Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
crstauf committed Oct 9, 2023
1 parent 3b7fb6a commit 0475117
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions classes/Activation.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ public function activate( $sitewide = false ) {
}

/**
* @param bool $network_wide
* @return void
*/
public function deactivate() {
public function deactivate( $network_wide = false ) {
$admins = QM_Util::get_admins();

// Remove legacy capability handling:
Expand All @@ -56,7 +57,7 @@ public function deactivate() {
}

# Only delete db.php if a single site and db.php belongs to Query Monitor
if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && class_exists( 'QM_DB', false ) && ! is_multisite() ) {
if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && class_exists( 'QM_DB', false ) && ( $network_wide || ! is_multisite() ) ) {
unlink( WP_CONTENT_DIR . '/db.php' ); // phpcs:ignore
}

Expand Down

0 comments on commit 0475117

Please sign in to comment.