33
0
mirror of https://github.com/joomla-extensions/patchtester.git synced 2025-01-22 22:58:27 +00:00

Change the way the values are quoted, use truncate instead of truncateComplex (Fix #95)

This commit is contained in:
Michael Babker 2015-05-23 10:57:30 -04:00
parent ed82aea47a
commit aa4106f00a

View File

@ -343,14 +343,27 @@ class PullsModel extends \JModelDatabase
foreach ($pulls as $pull)
{
// Build the data object to store in the database
$pullData = array($pull->number, $pull->title, \JHtml::_('string.truncateComplex', $pull->body, 100), $pull->html_url);
$data[] = implode($this->getDb()->quote($pullData), ',');
$pullData = array(
$pull->number,
$this->getDb()->quote($pull->title),
$this->getDb()->quote(\JHtml::_('string.truncate', $pull->body, 100)),
$this->getDb()->quote($pull->html_url)
);
$data[] = implode($pullData, ',');
}
$this->getDb()->setQuery(
$this->db->getQuery(true)
->insert('#__patchtester_pulls')
->columns('pull_id, title, description, pull_url')
$this->getDb()->getQuery(true)
->insert($this->getDb()->quoteName('#__patchtester_pulls'))
->columns(
array(
$this->getDb()->quoteName('pull_id'),
$this->getDb()->quoteName('title'),
$this->getDb()->quoteName('description'),
$this->getDb()->quoteName('pull_url')
)
)
->values($data)
);