From 44a21f2644f03062a79311fe65aa0c2a36a6f59c Mon Sep 17 00:00:00 2001 From: David Cramer Date: Tue, 11 Aug 2020 16:37:41 +0200 Subject: [PATCH 1/2] add check that a synctype is still available --- .../php/class-sync.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/class-sync.php b/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/class-sync.php index fed2c6ab8..5073d94b6 100644 --- a/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/class-sync.php +++ b/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/class-sync.php @@ -610,7 +610,7 @@ public function validate_sync_type( $type, $attachment_id ) { */ public function filter_status( $status, $attachment_id ) { - if ( $this->been_synced( $attachment_id ) || $this->is_pending( $attachment_id ) ) { + if ( $this->been_synced( $attachment_id ) && $this->is_pending( $attachment_id ) && $this->get_sync_type( $attachment_id ) ) { $sync_type = $this->get_sync_type( $attachment_id ); if ( ! empty( $sync_type ) && isset( $this->sync_base_struct[ $sync_type ] ) ) { // check process log in case theres an error. From 80369817184e6c62de6b53f66795db63707b54fb Mon Sep 17 00:00:00 2001 From: David Cramer Date: Tue, 11 Aug 2020 16:44:55 +0200 Subject: [PATCH 2/2] show items currently syncing, but not yet fully synced. --- .../php/class-sync.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/class-sync.php b/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/class-sync.php index 5073d94b6..215f161f8 100644 --- a/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/class-sync.php +++ b/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/class-sync.php @@ -610,7 +610,7 @@ public function validate_sync_type( $type, $attachment_id ) { */ public function filter_status( $status, $attachment_id ) { - if ( $this->been_synced( $attachment_id ) && $this->is_pending( $attachment_id ) && $this->get_sync_type( $attachment_id ) ) { + if ( $this->been_synced( $attachment_id ) || ( $this->is_pending( $attachment_id ) && $this->get_sync_type( $attachment_id ) ) ) { $sync_type = $this->get_sync_type( $attachment_id ); if ( ! empty( $sync_type ) && isset( $this->sync_base_struct[ $sync_type ] ) ) { // check process log in case theres an error.