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

Commit

Permalink
Fix create mother category link
Browse files Browse the repository at this point in the history
  • Loading branch information
kamel committed Oct 28, 2019
1 parent 8d2c550 commit 50e9127
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Add Italian translations file (module version 4.0.34) by aschio
- Fix on order modification configuration is ignored by mkdgs
- Fix work with other custom dirs by altatof
- Fix create mother category link

## 4.0.40.0
- Ajout du choix des roles utilisateurs synchronisés dans les options du site.
Expand Down
14 changes: 7 additions & 7 deletions class/data/eCommerceCategory.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ function create($user, $notrigger = 0)
$error = 0;

// Clean parameters
if (isset($this->$fk_category))
$this->$fk_category = intval($this->$fk_category);
if (isset($this->fk_category))
$this->fk_category = intval($this->fk_category);
if (isset($this->fk_site))
$this->fk_site = intval($this->fk_site);
if (isset($this->remote_id))
Expand All @@ -95,8 +95,8 @@ function create($user, $notrigger = 0)
$sql.= " '" . $this->db->escape($this->description) . "',";
$sql.= " " . $this->db->escape($this->fk_category) . ",";
$sql.= " " . $this->db->escape($this->fk_site) . ",";
$sql.= " '" . $this->db->escape($this->remote_id) . "',";
$sql.= " '" . $this->db->escape($this->remote_parent_id) . "',";
$sql.= " " . (isset($this->remote_id) ? intval($this->remote_id) : 0) . ",";
$sql.= " " . (isset($this->remote_parent_id) ? intval($this->remote_parent_id) : 0) . ",";
$sql.= " '" . $this->db->idate($this->last_update) . "'";
$sql.= ")";

Expand Down Expand Up @@ -209,8 +209,8 @@ function update($user = 0, $notrigger = 0)
$error = 0;

// Clean parameters
if (isset($this->$fk_category))
$this->$fk_category = intval($this->$fk_category);
if (isset($this->fk_category))
$this->fk_category = intval($this->fk_category);
if (isset($this->fk_site))
$this->fk_site = intval($this->fk_site);
if (isset($this->remote_id))
Expand All @@ -230,7 +230,7 @@ function update($user = 0, $notrigger = 0)
$sql.= " fk_category=" . (isset($this->fk_category) ? intval($this->fk_category) : 0) . ",";
$sql.= " fk_site=" . (isset($this->fk_site) ? intval($this->fk_site) : 0) . ",";
$sql.= " remote_id=" . (isset($this->remote_id) ? intval($this->remote_id) : 0) . ",";
$sql.= " remote_parent_id=" . (isset($this->remote_parent_id) ? intval($this->remote_parent_id) : $this->fk_site) . ",";
$sql.= " remote_parent_id=" . (isset($this->remote_parent_id) ? intval($this->remote_parent_id) : 0) . ",";
$sql.= " last_update=" . (isset($this->last_update) ? "'" . $this->db->idate($this->last_update) . "'" : "null") . "";
$sql.= " WHERE rowid=" . $this->id;

Expand Down

0 comments on commit 50e9127

Please sign in to comment.