mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix: encoding for ical export
This commit is contained in:
parent
069ea7edb0
commit
d8d5dbbf21
|
|
@ -571,6 +571,8 @@ class ActionComm
|
|||
$result=0;
|
||||
|
||||
$buildfile=true;
|
||||
$login='';$logina='';$logind='';$logint='';
|
||||
|
||||
if ($cachedelay)
|
||||
{
|
||||
// \TODO Check cache
|
||||
|
|
@ -603,6 +605,7 @@ class ActionComm
|
|||
if ($key == 'idaction') $sql.=' AND a.id='.$value;
|
||||
if ($key == 'login')
|
||||
{
|
||||
$login=$value;
|
||||
$userforfilter=new User($this->db);
|
||||
$userforfilter->fetch($value);
|
||||
$sql.= " AND (";
|
||||
|
|
@ -613,18 +616,21 @@ class ActionComm
|
|||
}
|
||||
if ($key == 'logina')
|
||||
{
|
||||
$logina=$value;
|
||||
$userforfilter=new User($this->db);
|
||||
$userforfilter->fetch($value);
|
||||
$sql.= " AND a.fk_user_author = ".$userforfilter->id;
|
||||
}
|
||||
if ($key == 'logint')
|
||||
{
|
||||
$logint=$value;
|
||||
$userforfilter=new User($this->db);
|
||||
$userforfilter->fetch($value);
|
||||
$sql.= " AND a.fk_user_action = ".$userforfilter->id;
|
||||
}
|
||||
if ($key == 'logind')
|
||||
{
|
||||
$logind=$value;
|
||||
$userforfilter=new User($this->db);
|
||||
$userforfilter->fetch($value);
|
||||
$sql.= " AND a.fk_user_done = ".$userforfilter->id;
|
||||
|
|
@ -677,9 +683,25 @@ class ActionComm
|
|||
return -1;
|
||||
}
|
||||
|
||||
$langs->load("agenda");
|
||||
|
||||
// Write file
|
||||
$title='Dolibarr actions';
|
||||
$desc='List of actions - built by Dolibarr';
|
||||
$more='';
|
||||
if ($login) $more=$langs->trans("User").' '.$login;
|
||||
if ($logina) $more=$langs->trans("ActionsAskedBy").' '.$logina;
|
||||
if ($logint) $more=$langs->trans("ActionsToDoBy").' '.$logint;
|
||||
if ($logind) $more=$langs->trans("ActionsDoneBy").' '.$logind;
|
||||
if ($more)
|
||||
{
|
||||
$title='Dolibarr actions - '.$more;
|
||||
$desc=$more.' - built by Dolibarr';
|
||||
}
|
||||
else
|
||||
{
|
||||
$title='Dolibarr actions';
|
||||
$desc=$langs->trans('ListOfActions').' - built by Dolibarr';
|
||||
}
|
||||
|
||||
if ($format == 'ical') $result=build_calfile($format,$title,$desc,$eventarray,$outputfile);
|
||||
if ($format == 'vcal') $result=build_calfile($format,$title,$desc,$eventarray,$outputfile);
|
||||
if ($format == 'rss') $result=build_rssfile($format,$title,$desc,$eventarray,$outputfile);
|
||||
|
|
|
|||
|
|
@ -90,6 +90,8 @@ function build_calfile($format='vcal',$title,$desc,$events_array,$outputfile,$fi
|
|||
// Format
|
||||
$summary=format_cal($format,$summary);
|
||||
$description=format_cal($format,$description);
|
||||
$category=format_cal($format,$category);
|
||||
$location=format_cal($format,$location);
|
||||
|
||||
$encoding='';
|
||||
if ($format == 'vcal') $encoding='ENCODING=QUOTED-PRINTABLE:';
|
||||
|
|
@ -132,8 +134,8 @@ function build_calfile($format='vcal',$title,$desc,$events_array,$outputfile,$fi
|
|||
/ "CANCELLED" ;Indicates journal is removed.
|
||||
;Status values for "VJOURNAL".
|
||||
*/
|
||||
if (! empty($category)) fwrite($calfileh,"CATEGORIES:".$category."\n");
|
||||
if (! empty($location)) fwrite($calfileh,"LOCATION:".$location."\n");
|
||||
if (! empty($category)) fwrite($calfileh,"CATEGORIES:".$encoding.$category."\n");
|
||||
if (! empty($location)) fwrite($calfileh,"LOCATION:".$encoding.$location."\n");
|
||||
//fwrite($calfileh,"TRANSP:".$transparency."\n");
|
||||
//fwrite($calfileh,"CLASS:PUBLIC\n"); // PUBLIC, PRIVATE, CONFIDENTIAL
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user