Skip to content

Commit

Permalink
fixed: delete rows, was not name quoting table name, could result in …
Browse files Browse the repository at this point in the history
…sql error if table was named "order" for example
  • Loading branch information
pollen8 committed Oct 3, 2013
1 parent a5c622a commit c450a14
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/com_fabrik/models/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -7690,13 +7690,16 @@ public function deleteRows(&$ids, $key = '')
{
return;
}

$query = $db->getQuery(true);
$query->delete($table->db_table_name)->where($key . ' IN (' . $val . ')');
$query->delete($db->quoteName($table->db_table_name))->where($key . ' IN (' . $val . ')');
$db->setQuery($query);

if (!$db->execute())
{
throw new Exception($db->getErrorMsg());
}

$this->deleteJoinedRows($val);

// Clean the cache.
Expand Down

0 comments on commit c450a14

Please sign in to comment.