diff options
author | Ivan Kohler <ivan@freeside.biz> | 2014-04-05 18:06:04 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2014-04-05 18:06:53 -0700 |
commit | 3f20bec8cc551e82274aa79bf1eb6ad8464e1558 (patch) | |
tree | 4c107e72f11687b31910d74a7162ad870242d648 /rt | |
parent | 08669c947afaeb4ac355e9cbd68ee82567d32f42 (diff) |
update RTx::Calendar from 0.14 to 0.17 (upstream fix for Digest::SHA1 -> Digest::SHA, remove obsolete Date::ICal dep) RT#16584
Diffstat (limited to 'rt')
-rw-r--r-- | rt/lib/RTx/Calendar.pm | 5 | ||||
-rw-r--r-- | rt/share/html/NoAuth/Calendar/dhandler | 13 | ||||
-rw-r--r-- | rt/share/html/Prefs/Calendar.html | 4 |
3 files changed, 11 insertions, 11 deletions
diff --git a/rt/lib/RTx/Calendar.pm b/rt/lib/RTx/Calendar.pm index e297566f0..be127072c 100644 --- a/rt/lib/RTx/Calendar.pm +++ b/rt/lib/RTx/Calendar.pm @@ -5,7 +5,7 @@ use base qw( Exporter ); use DateTime; use DateTime::Set; -our $VERSION = "0.14"; +our $VERSION = "0.17"; RT->AddStyleSheets('calendar.css') if RT->can('AddStyleSheets'); @@ -154,9 +154,8 @@ number based so that you can give those feeds to other people. If you upgrade from 0.02, see next part before. -You need to install those three modules : +You need to install those two modules : - * Date::ICal * Data::ICal * DateTime::Set diff --git a/rt/share/html/NoAuth/Calendar/dhandler b/rt/share/html/NoAuth/Calendar/dhandler index ea08c9a76..7c91bb5be 100644 --- a/rt/share/html/NoAuth/Calendar/dhandler +++ b/rt/share/html/NoAuth/Calendar/dhandler @@ -3,7 +3,6 @@ use Data::ICal; use Data::ICal::Entry::Todo; use Data::ICal::Entry::Event; -use Date::ICal; $RT::ICalTicketType ||= "Data::ICal::Entry::Todo"; $RT::ICalReminderType ||= "Data::ICal::Entry::Event"; @@ -109,12 +108,13 @@ sub add_event { return unless defined $Reminder->RefersTo->First; my $Ticket = $Reminder->RefersTo->First->TargetObj; + my $now = RT::Date->new( $session{'CurrentUser'} ); $now->SetToNow; my %event = ( summary => $Reminder->Subject ? $Reminder->Subject : '', url => "${RT::WebURL}/Ticket/Display.html?id=" . $Ticket->id, - uid => Date::ICal->new( epoch => time() )->ical() . "-" . $Reminder->Id . "@" . $uid, + uid => $now->iCal . "-" . $Reminder->Id . "@" . $uid, categories => $Ticket->QueueObj->Name, - dtstart => Date::ICal->new( epoch => $Reminder->DueObj->Unix )->ical, + dtstart => $Reminder->DueObj->iCal, ); my $event = $RT::ICalReminderType->new(); @@ -126,15 +126,16 @@ sub add_event { sub add_todo { my ($Ticket, $uid) = @_; + my $now = RT::Date->new( $session{'CurrentUser'} ); $now->SetToNow; my %vtodo = ( summary => $Ticket->Subject ? $Ticket->Subject : '', - dtstart => Date::ICal->new( epoch => $Ticket->CreatedObj->Unix )->ical, + dtstart => $Ticket->CreatedObj->iCal, url => "${RT::WebURL}/Ticket/Display.html?id=" . $Ticket->id, - uid => Date::ICal->new( epoch => time() )->ical() . "-" . $Ticket->Id . "@" . $uid, + uid => $now->iCal . "-" . $Ticket->Id . "@" . $uid, categories => $Ticket->QueueObj->Name, ); - $vtodo{due} = Date::ICal->new( epoch => $Ticket->DueObj->Unix )->ical, + $vtodo{due} = $Ticket->DueObj->iCal, if $Ticket->DueObj; if ($Ticket->OwnerObj->Id != $RT::Nobody->Id and $Ticket->OwnerObj->EmailAddress) { diff --git a/rt/share/html/Prefs/Calendar.html b/rt/share/html/Prefs/Calendar.html index 57eb007f6..af20acd0c 100644 --- a/rt/share/html/Prefs/Calendar.html +++ b/rt/share/html/Prefs/Calendar.html @@ -92,7 +92,7 @@ href="<%$RT::WebPath . '/Search/Build.html'%>">the Query Builder</a> </&> <%INIT> -use Digest::SHA 'sha1_base64'; +use Digest::SHA; use RT::SavedSearches; my $title = loc("Calendar Prefs"); @@ -111,7 +111,7 @@ if ($HiddenField && $HiddenField eq 'Private') { } if (defined $ChangeURL) { - my @args = $object->SetAttribute(Name => 'ICalURL', Content => sha1_base64(time)); + my @args = $object->SetAttribute(Name => 'ICalURL', Content => Digest::SHA::sha1_base64(time)); } elsif (defined $ResetURL) { my @args = $object->DeleteAttribute('ICalURL'); } |