From ac273893f006b4b52d686fea86f81a77e6194595 Mon Sep 17 00:00:00 2001 From: skeeter Date: Fri, 7 Sep 2001 17:10:23 +0000 Subject: [PATCH] Small fix for creating uid for non-mcrypt users. --- calendar/inc/class.socalendar_sql.inc.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/calendar/inc/class.socalendar_sql.inc.php b/calendar/inc/class.socalendar_sql.inc.php index 519dd18784..ef457ba014 100755 --- a/calendar/inc/class.socalendar_sql.inc.php +++ b/calendar/inc/class.socalendar_sql.inc.php @@ -387,13 +387,17 @@ class socalendar_ extends socalendar__ $id_suffix = $GLOBALS['phpgw']->common->randomstring(3).'local'; } $parts = Array( - 'title', - 'description' + 0 => 'title', + 1 => 'description' ); @reset($parts); while(list($key,$field) = each($parts)) { $part[$key] = substr($GLOBALS['phpgw']->crypto->encrypt($event[$field]),0,20); + if(!$GLOBALS['phpgw']->crypto->enabled) + { + $part[$key] = GLOBALS['phpgw']->crypto->bin2hex($part[$key]); + } } $event['uid'] = $part[0].'-'.$part[1].'@'.$id_suffix; $temp_name = tempnam($GLOBALS['phpgw_info']['server']['temp_dir'],'cal');