From 215cc95315e277e983f261b67c7a8f1e7bf1e510 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 4 Feb 2014 13:48:03 +0000 Subject: [PATCH] fixed problem reported by Pedro Ribeiro --- addressbook/csv_import.php | 4 ++-- calendar/csv_import.php | 4 ++-- phpgwapi/inc/class.html.inc.php | 2 +- preferences/inc/class.uiaclprefs.inc.php | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/addressbook/csv_import.php b/addressbook/csv_import.php index c9ee296840..50f095d064 100644 --- a/addressbook/csv_import.php +++ b/addressbook/csv_import.php @@ -254,8 +254,8 @@ switch($_POST['action']) break; case 'next': - $_POST['addr_fields'] = unserialize(stripslashes($_POST['addr_fields'])); - $_POST['trans'] = unserialize(stripslashes($_POST['trans'])); + $_POST['addr_fields'] = json_decode(stripslashes($_POST['addr_fields'])); + $_POST['trans'] = json_decode(stripslashes($_POST['trans'])); // fall-through case 'import': $hiddenvars = html::input_hidden(array( diff --git a/calendar/csv_import.php b/calendar/csv_import.php index 42fd114ed9..26605d9768 100644 --- a/calendar/csv_import.php +++ b/calendar/csv_import.php @@ -274,8 +274,8 @@ case 'download': break; case 'next': - $_POST['cal_fields'] = unserialize(stripslashes($_POST['cal_fields'])); - $_POST['trans'] = unserialize(stripslashes($_POST['trans'])); + $_POST['cal_fields'] = json_decode(stripslashes($_POST['cal_fields'])); + $_POST['trans'] = json_decode(stripslashes($_POST['trans'])); // fall-through case 'import': $hiddenvars = html::input_hidden(array( diff --git a/phpgwapi/inc/class.html.inc.php b/phpgwapi/inc/class.html.inc.php index 5aa39a5b6b..507eff95a6 100644 --- a/phpgwapi/inc/class.html.inc.php +++ b/phpgwapi/inc/class.html.inc.php @@ -431,7 +431,7 @@ class html { if (is_array($value)) { - $value = serialize($value); + $value = json_encode($value); } if (!$ignore_empty || $value && !($name == 'filter' && $value == 'none')) // dont need to send all the empty vars { diff --git a/preferences/inc/class.uiaclprefs.inc.php b/preferences/inc/class.uiaclprefs.inc.php index fc2811e24e..5804f8e085 100644 --- a/preferences/inc/class.uiaclprefs.inc.php +++ b/preferences/inc/class.uiaclprefs.inc.php @@ -105,7 +105,7 @@ class uiaclprefs if ($_POST['save'] || $_POST['apply']) { $processed = $_POST['processed']; - $to_remove = unserialize(urldecode($processed)); + $to_remove = json_decode(urldecode($processed)); foreach($to_remove as $uid) { //echo "deleting acl-records for $uid=".$GLOBALS['egw']->accounts->id2name($uid)." and $acl_app
\n"; @@ -276,7 +276,7 @@ class uiaclprefs 'search_type' => is_array($query_types) ? html::select('search_type',$search_type,$query_types) : '', 'search_value' => isset($query) && $query ? html::htmlspecialchars($query) : '', 'search' => lang('search'), - 'processed' => urlencode(serialize($processed)) + 'processed' => urlencode(json_encode($processed)) ); $letters = lang('alphabet');