1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 11:50:30 +02:00

Fixes #4468 - quick debugging of json data using type: 'text' and hidden() field fix.

This commit is contained in:
Cameron
2021-03-31 15:14:58 -07:00
parent 5ed2440272
commit 6d0810af0d
2 changed files with 11 additions and 1 deletions

View File

@@ -5381,6 +5381,11 @@ var_dump($select_options);*/
$value = defset($value,$value);
}
if(is_array($value) && ($attributes['data'] === 'json'))
{
$value = e107::serialize($value, 'json');
}
if(!empty($parms['truncate']))
{
$value = $tp->text_truncate($value, $parms['truncate'], '...');
@@ -6760,6 +6765,11 @@ var_dump($select_options);*/
$ret = '';
}
if(is_array($value) && ($attributes['data'] === 'json'))
{
$value = e107::serialize($value, 'json');
}
$ret .= $this->hidden($key, $value);
break;

View File

@@ -3645,7 +3645,7 @@ class e_tree_model extends e_front_model
*
* Sets the count in $this->_total
*
* @param resource $sql SQL resource that executed a query
* @param e_db_pdo $sql SQL resource that executed a query
* @return int Number of results from the latest query
*/
protected function countResults($sql)