Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
- Fix requête sql qui supprimer les liens en double pour un même ID d…
Browse files Browse the repository at this point in the history
…istant sur les produits
  • Loading branch information
kamel committed Jul 20, 2021
1 parent 5d1952b commit 3fc4683
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# ChangeLog

## 4.0.77.0
- Fix requête sql qui supprimer les liens en double pour un même ID distant sur les produits

## 4.0.76.0
- Correction mineure compatibilité V13+ avec la note d'un produit lors de sa creation sur Dolibarr pendant d'une synchro

Expand Down
6 changes: 4 additions & 2 deletions class/data/eCommerceSite.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,10 @@ function cleanDuplicatesRemoteID()
$ids[] = $obj->remote_id;
}
}
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "ecommerce_product WHERE remote_id IN (" . implode(',', $ids) . ")";
$this->db->query($sql);
if (!empty($ids)) {
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "ecommerce_product WHERE remote_id IN (" . implode(',', $ids) . ")";
$this->db->query($sql);
}
}

/**
Expand Down
4 changes: 2 additions & 2 deletions core/modules/modECommerceNg.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function __construct($db)
$this->editor_url = 'http://www.open-dsi.fr';

// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this->version = '4.0.76';
$this->version = '4.0.77';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
Expand Down Expand Up @@ -217,7 +217,7 @@ function __construct($db)
$this->cronjobs = array(
// 0=>array('label'=>'AutoSyncEcommerceNg', 'jobtype'=>'method', 'class'=>'ecommerceng/class/business/eCommerceUtils.class.php', 'objectname'=>'eCommerceUtils', 'method'=>'synchAll', 'parameters'=>'100', 'comment'=>'Synchronize all data from eCommerce to Dolibarr. Parameter is max nb of record to do per synchronization run.', 'frequency'=>1, 'unitfrequency'=>86400, 'priority'=>90, 'status'=>0, 'test'=>true),
1=>array('label'=>'ECommerceProcessPendingWebHooks', 'jobtype'=>'method', 'class'=>'/ecommerceng/class/business/eCommercePendingWebHook.class.php', 'objectname'=>'eCommercePendingWebHook', 'method'=>'cronProcessPendingWebHooks', 'parameters'=>'', 'comment'=>'Process all pending WebHooks.', 'frequency'=>15, 'unitfrequency'=>60, 'priority'=>90, 'status'=>0, 'test'=>true),
2=>array('label'=>'ECommerceCheckWebHooksStatus', 'jobtype'=>'method', 'class'=>'/ecommerceng/class/business/eCommercePendingWebHook.class.php', 'objectname'=>'eCommercePendingWebHook', 'method'=>'cronCheckWebHooksStatus', 'parameters'=>'', 'comment'=>'Check WebHooks status.', 'frequency'=>15, 'unitfrequency'=>60, 'priority'=>90, 'status'=>0, 'test'=>true),
2=>array('label'=>'ECommerceCheckWebHooksStatus', 'jobtype'=>'method', 'class'=>'/ecommerceng/class/business/eCommercePendingWebHook.class.php', 'objectname'=>'eCommercePendingWebHook', 'method'=>'cronCheckWebHooksStatus', 'parameters'=>'', 'comment'=>'Check WebHooks status.', 'frequency'=>15, 'unitfrequency'=>60, 'priority'=>80, 'status'=>0, 'test'=>true),
);

// Permissions
Expand Down

0 comments on commit 3fc4683

Please sign in to comment.