mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-20 13:40:55 +01:00
use json-encoding instead of (php-)serialize for storing of iCal X-properties in DB
This commit is contained in:
parent
ebefb71737
commit
7ab8e61250
@ -401,7 +401,7 @@ class infolog_ical extends infolog_bo
|
|||||||
{
|
{
|
||||||
if ($name[2] == ':')
|
if ($name[2] == ':')
|
||||||
{
|
{
|
||||||
if ($value[1] == ':' && ($v = unserialize($value)) !== false) $value = $v;
|
if (($v = json_php_unserialize($value)) && is_array($v)) $value = $v;
|
||||||
foreach((array)$value as $compvData)
|
foreach((array)$value as $compvData)
|
||||||
{
|
{
|
||||||
$comp = Horde_Icalendar::newComponent(substr($name,3), $vevent);
|
$comp = Horde_Icalendar::newComponent(substr($name,3), $vevent);
|
||||||
@ -409,7 +409,7 @@ class infolog_ical extends infolog_bo
|
|||||||
$vevent->addComponent($comp);
|
$vevent->addComponent($comp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif ($value[1] == ':' && ($attr = unserialize($value)) !== false)
|
elseif (($attr = json_php_unserialize($value)) && is_array($attr))
|
||||||
{
|
{
|
||||||
$vevent->setAttribute(substr($name, 2), $attr['value'], $attr['params'], true, $attr['values']);
|
$vevent->setAttribute(substr($name, 2), $attr['value'], $attr['params'], true, $attr['values']);
|
||||||
}
|
}
|
||||||
@ -866,7 +866,7 @@ class infolog_ical extends infolog_bo
|
|||||||
$attribute['values']);
|
$attribute['values']);
|
||||||
}
|
}
|
||||||
$taskData['##'.$attribute['name']] = $attribute['params'] || count($attribute['values']) > 1 ?
|
$taskData['##'.$attribute['name']] = $attribute['params'] || count($attribute['values']) > 1 ?
|
||||||
serialize($attribute) : $attribute['value'];
|
json_encode($attribute) : $attribute['value'];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user