X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FNoAuth%2FiCal%2Fdhandler;h=46c272921f112b27e53b56c0ebb4539d6fb19884;hb=5b3efac57771fbc37874a3dd39d3df835cdd6133;hp=c86f4cf7bd1c50e493f07d8c25efc361ea27834b;hpb=a6fe07e49e3fc12169e801b1ed6874c3a5bd8500;p=freeside.git diff --git a/rt/share/html/NoAuth/iCal/dhandler b/rt/share/html/NoAuth/iCal/dhandler index c86f4cf7b..46c272921 100644 --- a/rt/share/html/NoAuth/iCal/dhandler +++ b/rt/share/html/NoAuth/iCal/dhandler @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -48,7 +48,6 @@ <%init> use Data::ICal; use Data::ICal::Entry::Event; -use Encode (); my $path = $m->dhandler_arg; @@ -62,8 +61,8 @@ $notfound->() unless $path =~ m!^([^/]+)/([^/]+)/(.*)(\.(ical|ics))?!; my ($name, $auth, $search) = ($1, $2, $3); # Unescape parts $_ =~ s/\%([0-9a-z]{2})/chr(hex($1))/gei for $name, $search; -# convert to perl strings -$_ = Encode::decode_utf8( $_ ) for $name, $search; +# Decode from bytes to characters +$_ = Encode::decode( "UTF-8", $_ ) for $name, $search; my $user = RT::User->new( RT->SystemUser ); $user->Load( $name ); @@ -94,7 +93,7 @@ while (my $t = $tickets->Next) { my $start = Data::ICal::Entry::Event->new; my $end = Data::ICal::Entry::Event->new; $_->add_properties( - url => RT->Config->Get('WebURL') . "?q=".$t->id, + url => RT->Config->Get('WebURL') . "Ticket/Display.html?id=".$t->id, organizer => $t->OwnerObj->Name, dtstamp => $now->iCal, created => $t->CreatedObj->iCal,