mirror of
https://github.com/joomla-extensions/patchtester.git
synced 2025-01-23 15:18:36 +00:00
Change the way the values are quoted, use truncate instead of truncateComplex (Fix #95)
This commit is contained in:
parent
ed82aea47a
commit
aa4106f00a
@ -343,14 +343,27 @@ class PullsModel extends \JModelDatabase
|
|||||||
foreach ($pulls as $pull)
|
foreach ($pulls as $pull)
|
||||||
{
|
{
|
||||||
// Build the data object to store in the database
|
// Build the data object to store in the database
|
||||||
$pullData = array($pull->number, $pull->title, \JHtml::_('string.truncateComplex', $pull->body, 100), $pull->html_url);
|
$pullData = array(
|
||||||
$data[] = implode($this->getDb()->quote($pullData), ',');
|
$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->getDb()->setQuery(
|
||||||
$this->db->getQuery(true)
|
$this->getDb()->getQuery(true)
|
||||||
->insert('#__patchtester_pulls')
|
->insert($this->getDb()->quoteName('#__patchtester_pulls'))
|
||||||
->columns('pull_id, title, description, pull_url')
|
->columns(
|
||||||
|
array(
|
||||||
|
$this->getDb()->quoteName('pull_id'),
|
||||||
|
$this->getDb()->quoteName('title'),
|
||||||
|
$this->getDb()->quoteName('description'),
|
||||||
|
$this->getDb()->quoteName('pull_url')
|
||||||
|
)
|
||||||
|
)
|
||||||
->values($data)
|
->values($data)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user