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; break;
case 'next': case 'next':
$_POST['addr_fields'] = unserialize(stripslashes($_POST['addr_fields'])); $_POST['addr_fields'] = json_decode(stripslashes($_POST['addr_fields']));
$_POST['trans'] = unserialize(stripslashes($_POST['trans'])); $_POST['trans'] = json_decode(stripslashes($_POST['trans']));
// fall-through // fall-through
case 'import': case 'import':
$hiddenvars = html::input_hidden(array( $hiddenvars = html::input_hidden(array(

View File

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

View File

@ -1557,6 +1557,7 @@ class infolog_ui
{ {
if (($submit = is_array($content))) 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); //echo "infolog_ui::edit: content="; _debug_array($content);
$info_id = $content['info_id']; $info_id = $content['info_id'];
$action = $content['action']; unset($content['action']); $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 ); $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']); 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) if(!isset($content[$key]) || strlen($content[$key]) < 75)
{ {
@ -1789,7 +1790,7 @@ class infolog_ui
} }
$content[$key] = join("\n",$clarray); $content[$key] = join("\n",$clarray);
unset($clarray); unset($clarray);
} }*/
if (is_numeric($_REQUEST['cat_id'])) if (is_numeric($_REQUEST['cat_id']))
{ {
$content['info_cat'] = (int) $_REQUEST['cat_id']; $content['info_cat'] = (int) $_REQUEST['cat_id'];

View File

@ -455,7 +455,7 @@ class html
{ {
if (is_array($value)) 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 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']) if ($_POST['save'] || $_POST['apply'])
{ {
$processed = $_POST['processed']; $processed = $_POST['processed'];
$to_remove = unserialize(urldecode($processed)); $to_remove = json_decode(urldecode($processed));
foreach($to_remove as $uid) foreach($to_remove as $uid)
{ {
//echo "deleting acl-records for $uid=".$GLOBALS['egw']->accounts->id2name($uid)." and $acl_app<br>\n"; //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_type' => is_array($query_types) ? html::select('search_type',$search_type,$query_types) : '',
'search_value' => isset($query) && $query ? html::htmlspecialchars($query) : '', 'search_value' => isset($query) && $query ? html::htmlspecialchars($query) : '',
'search' => lang('search'), 'search' => lang('search'),
'processed' => urlencode(serialize($processed)) 'processed' => urlencode(json_encode($processed))
); );
$letters = lang('alphabet'); $letters = lang('alphabet');