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