1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-16 11:36:08 +02:00

Send field and field-type values to e_parse toDB

This commit is contained in:
Cameron
2017-01-29 11:08:43 -08:00
parent 375d019169
commit 0b920163a6
3 changed files with 51 additions and 6 deletions

View File

@@ -489,7 +489,7 @@ class e_parse extends e_parser
* @return string
* @todo complete the documentation of this essential method
*/
public function toDB($data, $nostrip =false, $no_encode = false, $mod = false, $original_author = false)
public function toDB($data, $nostrip =false, $no_encode = false, $mod = false, $parm = null)
{
$core_pref = e107::getConfig();
@@ -550,12 +550,11 @@ class e_parse extends e_parser
$no_encode = true;
}
if (is_numeric($original_author) && !check_class($core_pref->get('post_html'), '', $original_author))
if($parm !== null && is_numeric($parm) && !check_class($core_pref->get('post_html'), '', $parm))
{
$no_encode = false;
}
if ($no_encode === true && strpos($mod, 'no_html') === false)
{
$search = array('$', '"', "'", '\\', '<?');
@@ -595,8 +594,8 @@ class e_parse extends e_parser
$opts = array(
'nostrip' => $nostrip,
'noencode' => $no_encode,
'mode' => $mod,
'author' => $original_author
'type' => $parm['type'],
'field' => $parm['field']
);
foreach($eParseList as $plugin)