fixed problem reported by Pedro Ribeiro

This commit is contained in:
Ralf Becker 2014-02-04 13:50:23 +00:00
parent 247a7f824a
commit 84d20661c2
6 changed files with 11 additions and 7 deletions

View File

@ -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(

View File

@ -610,6 +610,7 @@ class infolog_bo
// pre-cache title and file access
self::set_link_cache($data);
}
error_log(__METHOD__."() mb_strlen(info_subject='{$this->data['info_subject']}')=".mb_strlen($this->data['info_subject']));
return $data;
}
@ -710,6 +711,7 @@ class infolog_bo
function write(&$values_in, $check_defaults=true, $touch_modified=true, $user2server=true,
$skip_notification=false, $throw_exception=false, $purge_cfs=null)
{
error_log(__METHOD__."() mb_strlen(info_subject='$values_in[info_subject]')=".mb_strlen($values_in['info_subject']));
$values = $values_in;
//echo "boinfolog::write()values="; _debug_array($values);
if (!$values['info_id'] && !$this->check_access(0,EGW_ACL_EDIT,$values['info_owner']) &&

View File

@ -409,6 +409,7 @@ class infolog_so
$this->data['#'.$row['info_extra_name']] = $row['info_extra_value'];
}
//error_log(__METHOD__.'('.array2string($where).') returning '.array2string($this->data));
error_log(__METHOD__."() mb_strlen(info_subject='{$this->data['info_subject']}')=".mb_strlen($this->data['info_subject']));
return $this->data;
}

View File

@ -1557,6 +1557,7 @@ class infolog_ui
{
if (($submit = is_array($content)))
{
error_log(__METHOD__."() mb_strlen(info_subject='$content[info_subject]')=".mb_strlen($content['info_subject']));
//echo "infolog_ui::edit: content="; _debug_array($content);
$info_id = $content['info_id'];
$action = $content['action']; unset($content['action']);
@ -1751,7 +1752,7 @@ class infolog_ui
$content = $this->bo->read( $info_id || $action != 'sp' ? $info_id : $action_id );
if (!(strpos($content['info_addr'],',')===false) && strpos($content['info_addr'],', ')===false) $content['info_addr'] = str_replace(',',', ',$content['info_addr']);
foreach(array('info_subject', 'info_des') as $key)
/* foreach(array('info_subject', 'info_des') as $key)
{
if(!isset($content[$key]) || strlen($content[$key]) < 75)
{
@ -1789,7 +1790,7 @@ class infolog_ui
}
$content[$key] = join("\n",$clarray);
unset($clarray);
}
}*/
if (is_numeric($_REQUEST['cat_id']))
{
$content['info_cat'] = (int) $_REQUEST['cat_id'];

View File

@ -455,7 +455,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
{

View File

@ -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<br>\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');