33
0
mirror of https://github.com/joomla-extensions/patchtester.git synced 2024-12-23 11:29:00 +00:00

Need to quote data values, tweak query building

This commit is contained in:
Michael Babker 2015-02-22 16:25:54 -05:00
parent fe839a077d
commit 2beee89e50

View File

@ -340,12 +340,15 @@ class PullsModel extends \JModelDatabase
{ {
// Build the data object to store in the database // Build the data object to store in the database
$pullData = array($pull->number, $pull->title, $pull->body, $pull->html_url); $pullData = array($pull->number, $pull->title, $pull->body, $pull->html_url);
$data[] = implode($pullData, ','); $data[] = implode($this->getDb()->quote($pullData), ',');
} }
$query = $this->getDb()->getQuery(); $this->getDb()->setQuery(
$query->insert('#__patchtester_pulls')->columns('pull_id, title, description, pull_url')->values($data); $this->db->getQuery(true)
$this->getDb()->setQuery($query); ->insert('#__patchtester_pulls')
->columns('pull_id, title, description, pull_url')
->values($data)
);
try try
{ {