mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-03-01 08:31:45 +01:00
automatic unserialize php serialized preferences on server-side, to fix not working old favorites stored php-serialized after r53433
This commit is contained in:
parent
56980366ba
commit
7b8d2c1bb5
@ -216,6 +216,15 @@ class preferences
|
|||||||
$app = trim($row['preference_app']);
|
$app = trim($row['preference_app']);
|
||||||
|
|
||||||
$prefs[$row['preference_owner']][$app] = self::unserialize($row['preference_value']);
|
$prefs[$row['preference_owner']][$app] = self::unserialize($row['preference_value']);
|
||||||
|
|
||||||
|
// fix old PHP serialized attribute-values
|
||||||
|
foreach($prefs[$row['preference_owner']][$app] as &$val)
|
||||||
|
{
|
||||||
|
if (is_string($val) && $val[0] != 'a' && $val[1] != ':' && ($v = php_safe_unserialize($val)))
|
||||||
|
{
|
||||||
|
$val = $v;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
foreach($db_read as $id)
|
foreach($db_read as $id)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user