[Rt-commit] r9624 - in rt/branches/3.6-EXPERIMENTAL-CATEGORIES: .
html html/Admin/Groups html/NoAuth/css html/Search/Elements
html/SelfService/Elements html/Ticket html/Ticket/Elements
html/User/Groups lib/RT lib/RT/Action lib/RT/Interface sbin
falcone at bestpractical.com
falcone at bestpractical.com
Fri Nov 9 14:50:32 EST 2007
Author: falcone
Date: Fri Nov 9 14:50:31 2007
New Revision: 9624
Added:
rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/NoAuth/css/dhandler
rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Ticket/Elements/ShowQueue
Modified:
rt/branches/3.6-EXPERIMENTAL-CATEGORIES/ (props changed)
rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Admin/Groups/Members.html
rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Elements/EditCustomFieldFreeform
rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Elements/EditLinks
rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Elements/Header
rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Elements/ShowLinks
rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Search/Elements/EditSearches
rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/SelfService/Elements/Tabs
rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Ticket/Create.html
rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Ticket/Elements/ShowBasics
rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Ticket/Elements/ShowMembers
rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Ticket/ModifyLinks.html
rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/User/Groups/Members.html
rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/autohandler
rt/branches/3.6-EXPERIMENTAL-CATEGORIES/lib/RT/Action/SendEmail.pm
rt/branches/3.6-EXPERIMENTAL-CATEGORIES/lib/RT/Interface/Web.pm
rt/branches/3.6-EXPERIMENTAL-CATEGORIES/lib/RT/Record.pm
rt/branches/3.6-EXPERIMENTAL-CATEGORIES/lib/RT/Template_Overlay.pm
rt/branches/3.6-EXPERIMENTAL-CATEGORIES/sbin/rt-test-dependencies.in
Log:
* bring categories branch up to date
Modified: rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Admin/Groups/Members.html
==============================================================================
--- rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Admin/Groups/Members.html (original)
+++ rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Admin/Groups/Members.html Fri Nov 9 14:50:31 2007
@@ -94,8 +94,8 @@
<li><input type="checkbox" class="checkbox" name="DeleteMember-<%$member->MemberId%>" value="1" />
<%$member->MemberObj->Object->Name%>
% }
-% }
</ul>
+% }
</td>
<td valign="top">
<& /Admin/Elements/SelectNewGroupMembers, Name => "AddMembers", Group => $Group,
Modified: rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Elements/EditCustomFieldFreeform
==============================================================================
--- rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Elements/EditCustomFieldFreeform (original)
+++ rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Elements/EditCustomFieldFreeform Fri Nov 9 14:50:31 2007
@@ -57,7 +57,8 @@
while (my $value = $Values->Next ) {
$Default .= $value->Content."\n";
}
-} else {
+}
+elsif ( ! $Multiple ) {
$Default =~ s/\s*\n\s*/ /g if $Default;
}
</%INIT>
Modified: rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Elements/EditLinks
==============================================================================
--- rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Elements/EditLinks (original)
+++ rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Elements/EditLinks Fri Nov 9 14:50:31 2007
@@ -68,7 +68,6 @@
<td class="labeltop"><&|/l&>Depended on by</&>:</td>
<td class="value">
% while (my $link = $Object->DependedOnBy->Next) {
-% my $member = $link->BaseObj;
<input type="checkbox" class="checkbox" name="DeleteLink-<%$link->Base%>-<%$link->Type%>-" value="1" />
<& ShowLink, URI => $link->BaseURI &><br />
% }
Modified: rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Elements/Header
==============================================================================
--- rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Elements/Header (original)
+++ rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Elements/Header Fri Nov 9 14:50:31 2007
@@ -58,7 +58,7 @@
% }
<link rel="shortcut icon" href="<%$RT::WebImagesURL%>/favicon.png" type="image/png" />
-<link rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/css/<% $RT::WebDefaultStylesheet %>/main.css" type="text/css" media="all" />
+<link rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/css/<% $RT::WebDefaultStylesheet %>/main-squished.css" type="text/css" media="all" />
<link rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/css/print.css" type="text/css" media="print" />
% if ( $RSSAutoDiscovery ) {
Modified: rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Elements/ShowLinks
==============================================================================
--- rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Elements/ShowLinks (original)
+++ rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Elements/ShowLinks Fri Nov 9 14:50:31 2007
@@ -51,7 +51,7 @@
<td class="value">
<ul>
% while (my $Link = $Ticket->DependsOn->Next) {
-<li><& ShowLink, URI => $Link->TargetURI &>
+<li><& ShowLink, URI => $Link->TargetURI &></li>
% }
</ul>
</td>
@@ -61,7 +61,7 @@
<td class="value">
<ul>
% while (my $Link = $Ticket->DependedOnBy->Next) {
-<li><& ShowLink, URI => $Link->BaseURI &>
+<li><& ShowLink, URI => $Link->BaseURI &></li>
% }
</ul>
</td>
@@ -71,7 +71,7 @@
<td class="value">
<ul>
% while (my $Link = $Ticket->MemberOf->Next) {
-<li><& ShowLink, URI => $Link->TargetURI &>
+<li><& ShowLink, URI => $Link->TargetURI &></li>
% }
</ul>
</td>
@@ -85,7 +85,7 @@
<td class="value">
<ul>
% while (my $Link = $Ticket->RefersTo->Next) {
-<li><& ShowLink, URI => $Link->TargetURI &>
+<li><& ShowLink, URI => $Link->TargetURI &></li>
% }
</ul>
</td>
@@ -96,7 +96,7 @@
<ul>
% while (my $Link = $Ticket->ReferredToBy->Next) {
% next if (UNIVERSAL::isa($Link->BaseObj, 'RT::Ticket') && $Link->BaseObj->Type eq 'reminder');
-<li><& ShowLink, URI => $Link->BaseURI &>
+<li><& ShowLink, URI => $Link->BaseURI &></li>
% }
</ul>
</td>
Added: rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/NoAuth/css/dhandler
==============================================================================
--- (empty file)
+++ rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/NoAuth/css/dhandler Fri Nov 9 14:50:31 2007
@@ -0,0 +1,30 @@
+<%ONCE>
+my $squisher;
+</%ONCE>
+<%INIT>
+my $arg = $m->dhandler_arg;
+my $path;
+if ( $arg =~ m{^(.*)-squished(\.[^\.]+)$} ) {
+ $path = $m->current_comp->dir_path .'/'. $1 . $2;
+}
+else {
+ return $m->decline;
+}
+
+$squisher = new RT::CSS::Squish unless $squisher;
+$squisher->{'mason'} = $m;
+
+$m->out( $squisher->concatenate( $path ) );
+
+package RT::CSS::Squish;
+use CSS::Squish '0.06';
+use base qw(CSS::Squish);
+sub file_handle {
+ my $self = shift;
+ my $file = shift;
+ my $content = $self->{'mason'}->scomp($file);
+ open my $fh, '<', \$content or die "$!";
+ return $fh;
+}
+
+</%INIT>
Modified: rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Search/Elements/EditSearches
==============================================================================
--- rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Search/Elements/EditSearches (original)
+++ rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Search/Elements/EditSearches Fri Nov 9 14:50:31 2007
@@ -57,8 +57,8 @@
% }
<&|/l&>Description</&>:<br>
<font size="-1"><input size="25" name="Description" value="<%$CurrentSearch->{'Description'} || ''%>" /></font>
-<nobr>
% if ($SearchId ne 'new') {
+<nobr>
% if ($Dirty) {
<input type="submit" class="button" name="Revert" value="<%loc('Revert')%>" />
% }
Modified: rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/SelfService/Elements/Tabs
==============================================================================
--- rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/SelfService/Elements/Tabs (original)
+++ rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/SelfService/Elements/Tabs Fri Nov 9 14:50:31 2007
@@ -45,6 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
+<& /Elements/Callback, tabs => $tabs, %ARGS &>
<& /Elements/PageLayout,
current_toptab => $current_toptab,
current_tab => $current_tab,
@@ -79,7 +80,7 @@
},
B => { title => loc('Closed tickets'),
path => 'SelfService/Closed.html',
- }
+ },
};
if ($queue_count > 1) {
Modified: rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Ticket/Create.html
==============================================================================
--- rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Ticket/Create.html (original)
+++ rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Ticket/Create.html Fri Nov 9 14:50:31 2007
@@ -62,8 +62,8 @@
<&| /Widgets/TitleBox, title => loc("Create a new ticket") &>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td class="label"><&|/l&>Queue</&>:</td>
-<td class="value"><% $QueueObj->Name %>
-<input type="hidden" class="hidden" name="Queue" value="<%$QueueObj->Name%>" />
+<td class="value"><& Elements/ShowQueue, QueueObj => $QueueObj &>
+<input type="hidden" class="hidden" name="Queue" value="<% $QueueObj->Name %>" />
</td>
<td class="label"><&|/l&>Status</&>:
</td>
@@ -240,6 +240,78 @@
<%INIT>
+my $CloneTicketObj;
+if ( $CloneTicket ) {
+ $CloneTicketObj = RT::Ticket->new( $session{CurrentUser} );
+ $CloneTicketObj->Load($CloneTicket) or Abort(loc("Ticket could not be loaded"));
+
+ my $clone = {
+ Requestors => join( ',', $CloneTicketObj->RequestorAddresses ),
+ Cc => join( ',', $CloneTicketObj->CcAddresses),
+ AdminCc => join( ',', $CloneTicketObj->AdminCcAddresses),
+ InitialPriority => $CloneTicketObj->Priority,
+ };
+
+ $clone->{$_} = $CloneTicketObj->$_()
+ for qw/Owner Subject FinalPriority TimeEstimated TimeWorked
+ Status TimeLeft Starts Started Due Resolved/;
+
+ my $members = $CloneTicketObj->Members;
+ my ( @members, @members_of, @refers, @refers_by, @depends, @depends_by );
+ while ( my $member = $members->Next ) {
+ push @members, $member->LocalBase;
+ }
+ $clone->{'MemberOf-new'} = join ' ', @members;
+
+ my $members_of = $CloneTicketObj->MemberOf;
+ while ( my $member_of = $members_of->Next ) {
+ push @members_of, $member_of->LocalTarget;
+ }
+ $clone->{'new-MemberOf'} = join ' ', @members_of;
+
+ my $refers = $CloneTicketObj->RefersTo;
+ while ( my $refer = $refers->Next ) {
+ push @refers, $refer->LocalTarget;
+ }
+ $clone->{'new-RefersTo'} = join ' ', @refers;
+
+ my $refers_by = $CloneTicketObj->ReferredToBy;
+ while ( my $refer_by = $refers_by->Next ) {
+ push @refers_by, $refer_by->LocalBase;
+ }
+ $clone->{'RefersTo-new'} = join ' ', @refers_by;
+
+ my $depends = $CloneTicketObj->DependsOn;
+ while ( my $depend = $depends->Next ) {
+ push @depends, $depend->LocalTarget;
+ }
+ $clone->{'new-DependsOn'} = join ' ', @depends;
+
+ my $depends_by = $CloneTicketObj->DependedOnBy;
+ while ( my $depend_by = $depends_by->Next ) {
+ push @depends_by, $depend_by->LocalBase;
+ }
+ $clone->{'DependsOn-new'} = join ' ', @depends_by;
+
+
+
+ my $cfs = $CloneTicketObj->QueueObj->TicketCustomFields();
+ while ( my $cf = $cfs->Next ) {
+ my $cf_id = $cf->id;
+ my $cf_values = $CloneTicketObj->CustomFieldValues( $cf->id );
+ my @cf_values;
+ while ( my $cf_value = $cf_values->Next ) {
+ push @cf_values, $cf_value->Content;
+ }
+ $clone->{"Object-RT::Ticket--CustomField-$cf_id-Value"}
+ = join "\n", @cf_values;
+ }
+
+ for ( keys %$clone ) {
+ $ARGS{$_} = $clone->{$_} if not defined $ARGS{$_};
+ }
+
+}
my @results;
my $QueueObj = new RT::Queue($session{'CurrentUser'});
@@ -329,4 +401,5 @@
$MemberOf => undef
$QuoteTransaction => undef
$Queue => undef
+$CloneTicket => undef
</%ARGS>
Modified: rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Ticket/Elements/ShowBasics
==============================================================================
--- rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Ticket/Elements/ShowBasics (original)
+++ rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Ticket/Elements/ShowBasics Fri Nov 9 14:50:31 2007
@@ -76,7 +76,7 @@
</tr>
<tr>
<td class="label queue"><&|/l&>Queue</&>:</td>
- <td class="value queue"><%$Ticket->QueueObj->Name%></td>
+ <td class="value queue"><& ShowQueue, QueueObj => $Ticket->QueueObj &></td>
</tr>
<& /Elements/Callback, _CallbackName => 'EndOfList', TicketObj => $Ticket, %ARGS &>
</table>
Modified: rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Ticket/Elements/ShowMembers
==============================================================================
--- rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Ticket/Elements/ShowMembers (original)
+++ rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Ticket/Elements/ShowMembers Fri Nov 9 14:50:31 2007
@@ -45,21 +45,20 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-% if ($members->Count) {
<ul>
% while (my $link = $members->Next) {
-% my $member= $link->BaseObj;
-<li><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: <%$member->Subject%> [<%loc($member->Status)%>]<br />
+<li><& /Elements/ShowLink, URI => $link->BaseURI &><br />
% if ($depth < 8) {
-<&/Ticket/Elements/ShowMembers, Ticket => $member, depth => ($depth+1) &>
+<& /Ticket/Elements/ShowMembers, Ticket => $link->BaseObj, depth => ($depth+1) &>
% }
+</li>
% }
</ul>
-% }
<%INIT>
my $members = $Ticket->Members;
+return unless $members->Count;
</%INIT>
Added: rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Ticket/Elements/ShowQueue
==============================================================================
--- (empty file)
+++ rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Ticket/Elements/ShowQueue Fri Nov 9 14:50:31 2007
@@ -0,0 +1,9 @@
+<% $QueueObj->Name %>
+<%ARGS>
+$QueueObj
+</%ARGS>
+<%INIT>
+my $value = $QueueObj->Name;
+$value = '#'. $QueueObj->id
+ unless defined $value && length $value;
+</%INIT>
Modified: rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Ticket/ModifyLinks.html
==============================================================================
--- rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Ticket/ModifyLinks.html (original)
+++ rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Ticket/ModifyLinks.html Fri Nov 9 14:50:31 2007
@@ -67,10 +67,12 @@
<%INIT>
-
+
my $Ticket = LoadTicket($id);
-$m->comp('/Elements/Callback', TicketObj => $Ticket, ARGSRef => \%ARGS);
-my @results = ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS);
+
+my @results;
+$m->comp('/Elements/Callback', TicketObj => $Ticket, ARGSRef => \%ARGS, Results => \@results );
+push @results, ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS );
</%INIT>
Modified: rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/User/Groups/Members.html
==============================================================================
--- rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/User/Groups/Members.html (original)
+++ rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/User/Groups/Members.html Fri Nov 9 14:50:31 2007
@@ -95,8 +95,8 @@
<li><input type="checkbox" class="checkbox" name="DeleteMember-<%$member->MemberId%>" value="1" />
<%$member->MemberObj->Object->Name%>
% }
-% }
</ul>
+% }
</td>
</tr>
</table>
Modified: rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/autohandler
==============================================================================
--- rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/autohandler (original)
+++ rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/autohandler Fri Nov 9 14:50:31 2007
@@ -165,12 +165,12 @@
if ($val) {
- # now get user specific information, to better create our user.
+ # now get user specific information, to better create our user.
my $new_user_info
= RT::Interface::Web::WebExternalAutoInfo($user);
- # set the attributes that have been defined.
- # FIXME: this is a horrible kludge. I'm sure there's something cleaner
+ # set the attributes that have been defined.
+ # FIXME: this is a horrible kludge. I'm sure there's something cleaner
foreach my $attribute (
'Name', 'Comments',
'Signature', 'EmailAddress',
Modified: rt/branches/3.6-EXPERIMENTAL-CATEGORIES/lib/RT/Action/SendEmail.pm
==============================================================================
--- rt/branches/3.6-EXPERIMENTAL-CATEGORIES/lib/RT/Action/SendEmail.pm (original)
+++ rt/branches/3.6-EXPERIMENTAL-CATEGORIES/lib/RT/Action/SendEmail.pm Fri Nov 9 14:50:31 2007
@@ -100,7 +100,9 @@
# {{{ sub Commit
sub Commit {
- my $self = shift;
+ # DO NOT SHIFT @_ in this subroutine. It breaks Hook::LexWrap's
+ # ability to pass @_ to a 'post' routine.
+ my $self = $_[0];
my ($ret) = $self->SendMessage( $self->TemplateObj->MIMEObj );
if ( $ret > 0 ) {
@@ -241,8 +243,9 @@
=cut
sub SendMessage {
- my $self = shift;
- my $MIMEObj = shift;
+ # DO NOT SHIFT @_ in this subroutine. It breaks Hook::LexWrap's
+ # ability to pass @_ to a 'post' routine.
+ my ( $self, $MIMEObj ) = @_;
my $msgid = $MIMEObj->head->get('Message-ID');
chomp $msgid;
@@ -473,7 +476,12 @@
ActivateScrips => 0
);
-
+ if( $id ) {
+ $self->{'OutgoingMailTransaction'} = $id;
+ } else {
+ $RT::Logger->warning( "Could not record outgoing message transaction: $msg" );
+ }
+ return $id;
}
# }}}
@@ -907,10 +915,6 @@
my $value = $self->TemplateObj->MIMEObj->head->get($field);
- # don't bother if it's us-ascii
-
- # See RT::I18N, 'NOTES: Why Encode::_utf8_off before Encode::from_to'
-
$value = $self->MIMEEncodeString($value, $enc);
$self->TemplateObj->MIMEObj->head->replace( $field, $value );
@@ -946,25 +950,36 @@
$max = int($max/3)*3;
chomp $value;
- return ($value) unless $value =~ /[^\x20-\x7e]/;
- $value =~ s/\s*$//;
- Encode::_utf8_off($value);
- my $res = Encode::from_to( $value, "utf-8", $charset );
-
- if ($max > 0) {
- # copy value and split in chuncks
- my $str=$value;
- my @chunks = unpack("a$max" x int(length($str)/$max
- + ((length($str) % $max) ? 1:0)), $str);
- # encode an join chuncks
- $value = join " ",
- map encode_mimeword( $_, $encoding, $charset ), @chunks ;
- return($value);
- } else {
+ if ( $max <= 0 ) {
# gives an error...
$RT::Logger->crit("Can't encode! Charset or encoding too big.\n");
+ return ($value);
}
+
+ return ($value) unless $value =~ /[^\x20-\x7e]/;
+
+ $value =~ s/\s*$//;
+
+ # we need perl string to split thing char by char
+ Encode::_utf8_on($value) unless Encode::is_utf8( $value );
+
+ my ($tmp, @chunks) = ('', ());
+ while ( length $value ) {
+ my $char = substr($value, 0, 1, '');
+ my $octets = Encode::encode( $charset, $char );
+ if ( length($tmp) + length($octets) > $max ) {
+ push @chunks, $tmp;
+ $tmp = '';
+ }
+ $tmp .= $octets;
+ }
+ push @chunks, $tmp if length $tmp;
+
+ # encode an join chuncks
+ $value = join "\n ",
+ map encode_mimeword( $_, $encoding, $charset ), @chunks ;
+ return($value);
}
# }}}
Modified: rt/branches/3.6-EXPERIMENTAL-CATEGORIES/lib/RT/Interface/Web.pm
==============================================================================
--- rt/branches/3.6-EXPERIMENTAL-CATEGORIES/lib/RT/Interface/Web.pm (original)
+++ rt/branches/3.6-EXPERIMENTAL-CATEGORIES/lib/RT/Interface/Web.pm Fri Nov 9 14:50:31 2007
@@ -214,11 +214,16 @@
=cut
sub StaticFileHeaders {
+ # make cache public
+ $HTML::Mason::Commands::r->headers_out->{'Cache-Control'} = 'max-age=259200, public';
+
# Expire things in a month.
$HTML::Mason::Commands::r->headers_out->{'Expires'} = HTTP::Date::time2str( time() + 2592000 );
+ # if we set 'Last-Modified' then browser request a comp using 'If-Modified-Since'
+ # request, but we don't handle it and generate full reply again
# Last modified at server start time
- $HTML::Mason::Commands::r->headers_out->{'Last-Modified'} = HTTP::Date::time2str($^T);
+ #$HTML::Mason::Commands::r->headers_out->{'Last-Modified'} = HTTP::Date::time2str($^T);
}
@@ -336,6 +341,7 @@
From => $ARGS{'From'},
Cc => $ARGS{'Cc'},
Body => $ARGS{'Content'},
+ Type => $ARGS{'ContentType'},
);
if ( $ARGS{'Attachments'} ) {
@@ -533,6 +539,7 @@
my $Message = MakeMIMEEntity(
Subject => $args{ARGSRef}->{'UpdateSubject'},
Body => $args{ARGSRef}->{'UpdateContent'},
+ Type => $args{ARGSRef}->{'UpdateContentType'},
);
$Message->head->add( 'Message-ID' =>
@@ -610,6 +617,8 @@
Takes a paramhash Subject, Body and AttachmentFieldName.
+Also takes Form, Cc and Type as optional paramhash keys.
+
Returns a MIME::Entity.
=cut
@@ -623,6 +632,7 @@
Cc => undef,
Body => undef,
AttachmentFieldName => undef,
+ Type => undef,
# map Encode::encode_utf8($_), @_,
@_,
);
@@ -640,6 +650,7 @@
Subject => $args{'Subject'} || "",
From => $args{'From'},
Cc => $args{'Cc'},
+ Type => $args{'Type'} || 'text/plain',
'Charset:' => 'utf8',
Data => [ $args{'Body'} ]
);
Modified: rt/branches/3.6-EXPERIMENTAL-CATEGORIES/lib/RT/Record.pm
==============================================================================
--- rt/branches/3.6-EXPERIMENTAL-CATEGORIES/lib/RT/Record.pm (original)
+++ rt/branches/3.6-EXPERIMENTAL-CATEGORIES/lib/RT/Record.pm Fri Nov 9 14:50:31 2007
@@ -1033,7 +1033,7 @@
=head2 ReferredToBy
- This returns an RT::Links object which shows all references for which this ticket is a target
+This returns an L<RT::Links> object which shows all references for which this ticket is a target
=cut
@@ -1236,9 +1236,14 @@
# {{{ sub _Links
-=head2 Links DIRECTION TYPE
+=head2 Links DIRECTION [TYPE]
-return links to/from this object.
+Return links (L<RT::Links>) to/from this object.
+
+DIRECTION is either 'Base' or 'Target'.
+
+TYPE is a type of links to return, it can be omitted to get
+links of any type.
=cut
Modified: rt/branches/3.6-EXPERIMENTAL-CATEGORIES/lib/RT/Template_Overlay.pm
==============================================================================
--- rt/branches/3.6-EXPERIMENTAL-CATEGORIES/lib/RT/Template_Overlay.pm (original)
+++ rt/branches/3.6-EXPERIMENTAL-CATEGORIES/lib/RT/Template_Overlay.pm Fri Nov 9 14:50:31 2007
@@ -299,7 +299,8 @@
This routine performs Text::Template parsing on the template and then
imports the results into a MIME::Entity so we can really use it
- Takes a hash containing Argument, TicketObj, and TransactionObj.
+ Takes a hash containing Argument, TicketObj, and TransactionObj. TicketObj
+ and TransactionObj are not mandatory, but highly recommended.
It returns a tuple of (val, message)
If val is 0, the message contains an error message
@@ -365,9 +366,13 @@
local $T::Ticket = $args{'TicketObj'};
local $T::Transaction = $args{'TransactionObj'};
local $T::Argument = $args{'Argument'};
- local $T::Requestor = eval { $T::Ticket->Requestors->UserMembersObj->First->Name };
+ local $T::Requestor = eval { $T::Ticket->Requestors->UserMembersObj->First->Name } if $T::Ticket;
local $T::rtname = $RT::rtname;
- local *T::loc = sub { $T::Ticket->loc(@_) };
+
+ local *T::loc = sub {
+ $T::Ticket ? $T::Ticket->loc(@_)
+ : $self->CurrentUser->loc(@_)
+ };
my $content = $self->Content;
unless ( defined $content ) {
Modified: rt/branches/3.6-EXPERIMENTAL-CATEGORIES/sbin/rt-test-dependencies.in
==============================================================================
--- rt/branches/3.6-EXPERIMENTAL-CATEGORIES/sbin/rt-test-dependencies.in (original)
+++ rt/branches/3.6-EXPERIMENTAL-CATEGORIES/sbin/rt-test-dependencies.in Fri Nov 9 14:50:31 2007
@@ -200,6 +200,7 @@
Cache::Simple::TimedExpiry
UNIVERSAL::require
Calendar::Simple
+CSS::Squish 0.06
.
$deps{'MASON'} = [ text_to_hash( << '.') ];
@@ -214,6 +215,7 @@
GD::Graph
GD::Text
Text::WikiFormat 0.76
+CSS::Squish 0.06
.
$deps{'STANDALONE'} = [ text_to_hash( << '.') ];
More information about the Rt-commit
mailing list