mirror of
https://github.com/e107inc/e107.git
synced 2025-01-29 10:38:08 +01:00
PDO Fix for saving of e107::serialize() data. Saving of Extended Field data now working correctly.
This commit is contained in:
parent
846be2c23c
commit
e930ee68f1
@ -495,16 +495,16 @@ class users_admin_ui extends e_admin_ui
|
||||
}
|
||||
|
||||
|
||||
|
||||
function saveExtended($new_data)
|
||||
{
|
||||
$update = array();
|
||||
$fieldtype = array();
|
||||
foreach($this->extended as $key) // Grab Extended field data.
|
||||
{
|
||||
$update[$key] = vartrue($new_data['ue'][$key],'_NULL_');
|
||||
$update['data'][$key] = vartrue($new_data['ue'][$key],'_NULL_');
|
||||
}
|
||||
|
||||
e107::getMessage()->addDebug(print_a($update,true));
|
||||
e107::getUserExt()->addFieldTypes($update);
|
||||
|
||||
if(!empty($update))
|
||||
{
|
||||
|
@ -447,8 +447,13 @@ class e_array {
|
||||
$ArrayData = stripslashes($ArrayData);
|
||||
}
|
||||
|
||||
$ArrayData = str_replace('=>','=>',$ArrayData); //FIX for PDO encoding of strings. .
|
||||
|
||||
|
||||
$data = "";
|
||||
$ArrayData = '$data = '.$ArrayData.';';
|
||||
|
||||
|
||||
@eval($ArrayData);
|
||||
if (!isset($data) || !is_array($data))
|
||||
{
|
||||
|
@ -1522,7 +1522,8 @@ class e_form
|
||||
elseif(!empty($options['useLabelValues']))
|
||||
{
|
||||
$key = $label;
|
||||
$c = in_array($label, $checked) ? true : false;
|
||||
//print_a($label);
|
||||
$c = in_array($label, e107::getParser()->toDB($checked)) ? true : false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1535,6 +1536,8 @@ class e_form
|
||||
$text .= $this->checkbox($cname, $key, $c, $label);
|
||||
}
|
||||
|
||||
// return print_a($checked,true);
|
||||
|
||||
if(!empty($text))
|
||||
{
|
||||
return "<div class='checkboxes' style='display:inline-block'>".$text."</div>";
|
||||
|
@ -1224,7 +1224,7 @@ class e_db_mysql
|
||||
case 'array':
|
||||
if(is_array($fieldValue))
|
||||
{
|
||||
return e107::serialize($fieldValue, true);
|
||||
return e107::serialize($fieldValue);
|
||||
}
|
||||
return $fieldValue;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user