Changeset 13431 for trunk/src/bp-blogs/bp-blogs-functions.php
- Timestamp:
- 02/24/2023 09:37:44 AM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-blogs/bp-blogs-functions.php
r13405 r13431 117 117 118 118 // Truncate user blogs table. 119 $truncate = $wpdb->query( "TRUNCATE {$bp->blogs->table_name}" ); 119 if ( $bp->is_phpunit_running ) { 120 $query_part = 'DELETE FROM'; 121 } else { 122 $query_part = 'TRUNCATE'; 123 } 124 125 $truncate = $wpdb->query( "{$query_part} {$bp->blogs->table_name}" ); 120 126 if ( is_wp_error( $truncate ) ) { 121 127 return false; … … 123 129 124 130 // Truncate user blogmeta table. 125 $truncate = $wpdb->query( " TRUNCATE{$bp->blogs->table_name_blogmeta}" );131 $truncate = $wpdb->query( "{$query_part} {$bp->blogs->table_name_blogmeta}" ); 126 132 if ( is_wp_error( $truncate ) ) { 127 133 return false;
Note: See TracChangeset
for help on using the changeset viewer.