1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-26 07:44:49 +02:00

UI data 'comma' converted to type;

model supports data type 'set' and 'enum' now;
'userclasses' type works as expected;
#9 related, testing required
This commit is contained in:
SecretR
2012-12-17 16:57:24 +02:00
parent 04e9157961
commit ed648b9ea4
6 changed files with 119 additions and 48 deletions

View File

@@ -2398,9 +2398,10 @@ class e_front_model extends e_model
$qry['_FIELD_TYPES'][$key] = $type; //_FIELD_TYPES much more optional now...
}
if($qry['_FIELD_TYPES'][$key] == 'comma') //XXX quick fix.
if($qry['_FIELD_TYPES'][$key] == 'set') //new 'set' type, could be moved in mysql handler now
{
$qry['_FIELD_TYPES'][$key] = 'str';
$qry['_FIELD_TYPES'][$key] = 'str';
if(is_array($this->getData($key))) $this->setData($key, implode(',', $this->getData($key)));
}
$qry['data'][$key] = $this->getData($key);
@@ -3278,6 +3279,11 @@ class e_front_tree_model extends e_tree_model
$ids = explode(',', $ids);
}
if(true === $syncvalue)
{
$syncvalue = $value;
}
if($sanitize)
{
$ids = array_map(array($tp, 'toDB'), $ids);