Skip to content

Commit

Permalink
replacing hardwired quotes with db->Quote call for element AES_DECRYP…
Browse files Browse the repository at this point in the history
…T in getAsField_html
  • Loading branch information
pollen8 committed Oct 12, 2011
1 parent b94c2e4 commit 4982167
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/com_fabrik/models/element.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,14 +359,14 @@ function getAsField_html(&$aFields, &$aAsFields, $opts = array())
$k = $db->nameQuote($dbtable).".".$db->nameQuote($this->_element->name);
$secret = JFactory::getConfig()->getValue('secret');
if ($this->encryptMe()) {
$k = "AES_DECRYPT($k, '".$secret."')";
$k = "AES_DECRYPT($k, ".$db->Quote($secret).")";
}

if ($this->isJoin()) {

$jkey = $this->_element->name;
if ($this->encryptMe()) {
$jkey = "AES_DECRYPT($jkey, '".$secret."')";
$jkey = "AES_DECRYPT($jkey, ".$db->Quote($secret).")";
}
$jointable = $this->getJoinModel()->getJoin()->table_join;
$fullElName = JArrayHelper::getValue($opts, 'alias', $db->nameQuote("$jointable" . "___" . $this->_element->name));
Expand All @@ -384,7 +384,7 @@ function getAsField_html(&$aFields, &$aAsFields, $opts = array())
}
$k = $db->nameQuote($dbtable).".".$db->nameQuote($this->_element->name);
if ($this->encryptMe()) {
$k = "AES_DECRYPT($k, '".$secret."')";
$k = "AES_DECRYPT($k, ".$db->Quote($secret).")";
}

if ($this->isJoin()) {
Expand Down

0 comments on commit 4982167

Please sign in to comment.