Skip to content

Commit ac1fe87

Browse files
authored
Merge pull request #144 from BeAPI/fix/sql-queries
Add the missing AND keyword in sql queries
2 parents 1dd98eb + f2f43c5 commit ac1fe87

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,32 +44,35 @@ If you really like what we do or want to thank us for our quick work, feel free
4444

4545
## Changelog
4646

47+
### 3.9.8
48+
* Fixed: Replace comma with the AND keyword in SQL queries
49+
4750
### 3.9.7
4851

49-
* Added : Add the cast for the arguments of the method
52+
* Added: Add the cast for the arguments of the method
5053

5154
### 3.9.6
5255

53-
* Fixed : fix a bug by ensure "post_name" is set with wp_post_update() instead wp_publish_post()
54-
* Added : object cache on relations
56+
* Fixed: fix a bug by ensure "post_name" is set with wp_post_update() instead wp_publish_post()
57+
* Added: object cache on relations
5558

5659
### 3.9.5
5760

58-
* Fixed : #136 When post does not exists on filter bea_csf.server.xxxx.merge
61+
* Fixed: #136 When post does not exists on filter bea_csf.server.xxxx.merge
5962
* Updating composer.json allowed plugin
6063

6164
### 3.9.4
6265

63-
* Fixed : Change the return type of `attachment_fields_to_edit` to array to match the filter type attended
64-
* Added : Add the minimum WordPress version to plugin header
66+
* Fixed: Change the return type of `attachment_fields_to_edit` to array to match the filter type attended
67+
* Added: Add the minimum WordPress version to plugin header
6568

6669
### 3.9.3
6770

68-
* Fixed : Correction of the syntax for the creation of the relations table. (Missing commas)
71+
* Fixed: Correction of the syntax for the creation of the relations table. (Missing commas)
6972

7073
### 3.9.2
7174

72-
* Feature : Added synchronisation of Gutenberg ACF blocks
75+
* Feature: Added synchronisation of Gutenberg ACF blocks
7376
* Fixed: Remove double all on admin widget
7477

7578
### 3.9.1

bea-content-sync-fusion.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: BEA - Content Sync Fusion
44
Plugin URI: https://beapi.fr
55
Description: Manage content synchronization across a WordPress multisite.
6-
Version: 3.9.7
6+
Version: 3.9.8
77
Author: Be API
88
Author URI: http://beapi.fr
99
Network: true
@@ -14,7 +14,7 @@
1414

1515
// Plugin constants
1616

17-
define( 'BEA_CSF_VERSION', '3.9.7' );
17+
define( 'BEA_CSF_VERSION', '3.9.8' );
1818
define( 'BEA_CSF_DB_VERSION', '1649671234' );
1919
define( 'BEA_CSF_OPTION', 'bea-content-sync-fusion' );
2020
define( 'BEA_CSF_CRON_QTY', 500 );

classes/models/relations.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public static function delete_by_receiver( $type, $receiver_blog_id, $receiver_i
216216
// Clean cache before delete
217217
$relations = $wpdb->get_results(
218218
$wpdb->prepare(
219-
"SELECT * FROM $wpdb->bea_csf_relations WHERE type = %s, receiver_blog_id = %d, receiver_id = %d",
219+
"SELECT * FROM $wpdb->bea_csf_relations WHERE type = %s AND receiver_blog_id = %d AND receiver_id = %d",
220220
$type,
221221
$receiver_blog_id,
222222
$receiver_id
@@ -258,7 +258,7 @@ public static function delete_by_emitter_and_receiver( $type, $emitter_blog_id,
258258
// Clean cache before delete
259259
$relations = $wpdb->get_results(
260260
$wpdb->prepare(
261-
"SELECT * FROM $wpdb->bea_csf_relations WHERE type = %s, emitter_blog_id = %d, emitter_id = %d, receiver_blog_id = %d, receiver_id = %d",
261+
"SELECT * FROM $wpdb->bea_csf_relations WHERE type = %s AND emitter_blog_id = %d AND emitter_id = %d AND receiver_blog_id = %d AND receiver_id = %d",
262262
$type,
263263
$emitter_blog_id,
264264
$emitter_id,

0 commit comments

Comments
 (0)