Opened 2 years ago

Closed 2 years ago

#2557 closed defect (fixed)

Shop Product Update Query can be malformed [FIX INSIDE]

Reported by: ramon.wenger Owned by: sebastian.brand
Priority: normal Milestone: Cloudrexx 5.0
Component: Shop Version: 3.0.4
Severity: normal Keywords:
Cc:

Description (last modified by ramon.wenger)

In modules/shop/lib/Product.class.php in the function update() change the $query = [...] and $objResult = [...] lines to:

$args = array($this->pictures, $this->category_id, $this->distribution, $this->price,

$this->resellerprice, $this->stock, $this->stock_visible ? 1 : 0, $this->discountprice, $this->discount_active ? 1 : 0, $this->active ? 1 : 0, $this->b2b ? 1 : 0, $this->b2c ? 1 : 0, $this->date_start, $this->date_end, $this->manufacturer_id, $this->ord, $this->vat_id, $this->weight, addslashes($this->flags), $this->usergroup_ids ? $this->usergroup_ids : 'NULL', $this->group_id ? $this->group_id : 'NULL', $this->article_id ? $this->article_id : 'NULL', $this->id);

$query = "

UPDATE ".DBPREFIX."module_shop".MODULE_INDEX."_products SET picture=?,

category_id=?, distribution=?, normalprice=?, resellerprice=?, stock=?, stock_visible=?, discountprice=?, discount_active=?, active=?, b2b=?, b2c=?, date_start=?, date_end=?, manufacturer_id=?, ord=?, vat_id=?, weight=?, flags=?, usergroup_ids=?, group_id=?, article_id=?

WHERE id=?";

$objResult = $objDatabase->Execute($query, $args);

Change History (6)

comment:1 Changed 2 years ago by ramon.wenger

  • Component changed from other(specify) to modules/shop
  • Description modified (diff)
  • Version changed from 3.0.2 to 3.0.4

comment:2 Changed 2 years ago by sebastian.brand

  • Resolution set to fixed
  • Status changed from new to closed

Entsprechend der Beschreibung geändert. contrexx 4 11dce0a3656877165bf63499cb9017ed81938804 trunk a26440d2a0633fbabeb3f0fc5aacd58244c89791

comment:3 Changed 2 years ago by sebastian.brand

Code geändert, dass dieser nun besser leserlich ist: contrexx 4 e9965c126d2bd74923c376b61d8fa1baf1905e2f trunk eaea42ce23a41e70fa4739758fe6fe3fccf3c927

comment:4 Changed 2 years ago by sebastian.brand

  • Milestone set to Cloudrexx 5.0
  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:5 Changed 2 years ago by sebastian.brand

  • Owner changed from comvation to sebastian.brand
  • Status changed from reopened to new

comment:6 Changed 2 years ago by sebastian.brand

  • Resolution set to fixed
  • Status changed from new to closed

Attribute hinzugefügt, dass versehentlich aus dem trunk entfernt wurde 2758ab513c1749960e44cc4d198deef196e49e0d

Note: See TracTickets for help on using tickets.