[Rt-commit] r5978 - in rt/branches/3.7-EXPERIMENTAL: . etc
html/Approvals/Elements html/Elements
html/Elements/RT__Ticket html/Ticket/Elements lib lib/RT
lib/RT/Action
ruz at bestpractical.com
ruz at bestpractical.com
Mon Sep 18 10:54:33 EDT 2006
Author: ruz
Date: Mon Sep 18 10:46:32 2006
New Revision: 5978
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/etc/RT_Config.pm.in
rt/branches/3.7-EXPERIMENTAL/html/Approvals/Elements/Approve
rt/branches/3.7-EXPERIMENTAL/html/Elements/EditCustomFieldFreeform
rt/branches/3.7-EXPERIMENTAL/html/Elements/RT__Ticket/ColumnMap
rt/branches/3.7-EXPERIMENTAL/html/Elements/SetupSessionCookie
rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/LoadTextAttachments
rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowTransactionAttachments
rt/branches/3.7-EXPERIMENTAL/lib/RT.pm.in
rt/branches/3.7-EXPERIMENTAL/lib/RT/Action/SendEmail.pm
rt/branches/3.7-EXPERIMENTAL/lib/RT/Ticket_Overlay.pm
rt/branches/3.7-EXPERIMENTAL/lib/RT/Tickets_Overlay.pm
rt/branches/3.7-EXPERIMENTAL/sbin/rt-test-dependencies.in
Log:
merge 3.6-RELEASE -> 3.7-EXPERIMENTAL
r3760 at cubic-pc (orig r5869): jesse | 2006-09-06 18:26:13 +0400
r27194 at pinglin: jesse | 2006-09-06 10:26:01 -0400
RT-Ticket:7852
RT-Status: resolved
RT-Update: correspond
* Tobias Kremer pointed out a typo in Ticket_Overlay.pm that caused
an error when a user got a certain permission denied message
r3761 at cubic-pc (orig r5871): jesse | 2006-09-06 23:07:16 +0400
r27202 at pinglin: jesse | 2006-09-06 14:59:10 -0400
* Handle Apache::Session database errors a bit more gracefully
r3762 at cubic-pc (orig r5872): jesse | 2006-09-06 23:07:22 +0400
r27203 at pinglin: jesse | 2006-09-06 15:07:04 -0400
RT-Ticket: 7848
RT-Status: resolved
RT-Update: correspond
* POSIX::strftime on Solaris isn't robust enough to deal with our Date: header generation.
Switched to Date::Format::strftime instead. - ADDED DEPENDENCY: Date::Format
Fix thanks to Tim Bishop
r3763 at cubic-pc (orig r5873): jesse | 2006-09-06 23:09:06 +0400
r27206 at pinglin: jesse | 2006-09-06 15:09:02 -0400
* Remove trailing '<br/>' from custom fields shown in ticket search results
r3764 at cubic-pc (orig r5886): jesse | 2006-09-09 00:50:39 +0400
r27286 at pinglin: jesse | 2006-09-08 12:51:22 -0400
* Finer-grained control of what's displayed on ticket approval from Drew Taylor.
r3765 at cubic-pc (orig r5887): jesse | 2006-09-09 00:50:50 +0400
r27290 at pinglin: jesse | 2006-09-08 13:50:04 -0400
Patch from Kevin Murphy to support the following features:
# If $SuppressInlineTextFiles is set to a true value, then uploaded
# text files (text-type attachments with file names) are prevented
# from being displayed in-line when viewing a ticket's history.
Set($SuppressInlineTextFiles, undef);
# If $DontSearchFileAttachments is set to a true value, then uploaded
# files (attachments with file names) are not searched during full-content
# ticket searches.
Set($DontSearchFileAttachments, undef);
r3766 at cubic-pc (orig r5888): jesse | 2006-09-09 00:51:01 +0400
r27291 at pinglin: jesse | 2006-09-08 14:19:50 -0400
* Support for marking RT's HTTP cookie as "secure." Patch from Pavel Ruzicka.
r3767 at cubic-pc (orig r5913): jesse | 2006-09-12 03:55:41 +0400
r27407 at pinglin: jesse | 2006-09-12 00:55:29 +0100
RT Essentials mistakenly suggests that users use '/' as an RT::WebPath.
Do what they mean if they screw up and do that.
r3768 at cubic-pc (orig r5938): jesse | 2006-09-15 17:50:43 +0400
r27502 at pinglin: jesse | 2006-09-15 14:50:38 +0100
Give Freeform form elements an id. This will be useful
in combination with the EditComponentName callback.
With a few local mods, date CFs will be able to use the
date picker. Without an id the date picker doesn't work.
-Todd Chapman
Modified: rt/branches/3.7-EXPERIMENTAL/etc/RT_Config.pm.in
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/etc/RT_Config.pm.in (original)
+++ rt/branches/3.7-EXPERIMENTAL/etc/RT_Config.pm.in Mon Sep 18 10:46:32 2006
@@ -355,8 +355,11 @@
# documents.
# If you're putting the web ui somewhere other than at the root of
-# your server
-# $WebPath requires a leading / but no trailing /
+# your server, you should set $WebPath to the path you'll be
+# serving RT at.
+# $WebPath requires a leading / but no trailing /.
+#
+# In most cases, you should leave $WebPath set to '' (an empty value).
Set($WebPath, "");
@@ -459,12 +462,22 @@
Set($AutoLogoff, 0);
+# By default, RT's session cookie isn't marked as "secure" Some web browsers
+# will treat secure cookies more carefully than non-secure ones, being careful
+# not to write them to disk, only send them over an SSL secured connection
+# and so on. To enable this behaviour, set # $WebSecureCookies to a true value.
+# NOTE: You probably don't want to turn this on _unless_ users are only connecting
+# via SSL encrypted HTTP connections.
+
+Set($WebSecureCookies, 0);
+
+
# By default, RT clears its database cache after every page view.
# This ensures that you've always got the most current information
# when working in a multi-process (mod_perl or FastCGI) Environment
# Setting $WebFlushDbCacheEveryRequest to '0' will turn this off,
# which will speed RT up a bit, at the expense of a tiny bit of data
-# accuracy
+# accuracy.
Set($WebFlushDbCacheEveryRequest, '1');
@@ -517,6 +530,18 @@
'<small>__LastUpdatedRelative__</small>',
'<small>__TimeLeft__</small>'});
+# If $SuppressInlineTextFiles is set to a true value, then uploaded
+# text files (text-type attachments with file names) are prevented
+# from being displayed in-line when viewing a ticket's history.
+
+Set($SuppressInlineTextFiles, undef);
+
+# If $DontSearchFileAttachments is set to a true value, then uploaded
+# files (attachments with file names) are not searched during full-content
+# ticket searches.
+
+Set($DontSearchFileAttachments, undef);
+
# MakeClicky detects various formats of data in headers and email
# messages, and extends them with supporting links. By default, RT
Modified: rt/branches/3.7-EXPERIMENTAL/html/Approvals/Elements/Approve
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Approvals/Elements/Approve (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Approvals/Elements/Approve Mon Sep 18 10:46:32 2006
@@ -52,8 +52,12 @@
<div class="originating-ticket">
<span class="link"><a href="<%RT->Config->Get('WebPath')%>/Ticket/Display.html?id=<% $approving->Id %>"><&|/l, $approving->Id, $approving->Subject &>Originating ticket: #[_1]</&></a></span>
<div class="info">
+% if ($ShowCustomFields) {
<& /Ticket/Elements/ShowCustomFields, Ticket => $approving &>
+% }
+% if ($ShowHistory) {
<& /Ticket/Elements/ShowHistory, Ticket => $approving, Collapsed => 0, ShowTitle => 0, ShowHeaders => 0, ShowDisplayModes => 0, ShowTitleBarCommands => 0 &>
+% }
</div>
</div>
% }
@@ -82,5 +86,7 @@
</div>
<%ARGS>
$ShowApproving => 1
+$ShowCustomFields => 1
+$ShowHistory => 1
$ticket => undef
</%ARGS>
Modified: rt/branches/3.7-EXPERIMENTAL/html/Elements/EditCustomFieldFreeform
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Elements/EditCustomFieldFreeform (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Elements/EditCustomFieldFreeform Mon Sep 18 10:46:32 2006
@@ -43,10 +43,11 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
+% my $name = $NamePrefix . $CustomField->Id . '-Value';
% if ($Multiple) {
-<textarea cols="<%$Cols%>" rows="<%$Rows%>" name="<%$NamePrefix%><%$CustomField->Id%>-Values"><%$Default%></textarea>
+<textarea cols="<%$Cols%>" rows="<%$Rows%>" name="<%$name%>s" id="<%$name%>s" ><%$Default%></textarea>
% } else {
-<input name="<%$NamePrefix%><%$CustomField->Id%>-Value" size="<%$Cols%>" value="<%$Default ? $Default : ''%>" />
+<input name="<%$name%>" id="<%$name%>" size="<%$Cols%>" value="<%$Default ? $Default : ''%>" />
% }
<%INIT>
if ($Multiple and $Values) {
Modified: rt/branches/3.7-EXPERIMENTAL/html/Elements/RT__Ticket/ColumnMap
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Elements/RT__Ticket/ColumnMap (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Elements/RT__Ticket/ColumnMap Mon Sep 18 10:46:32 2006
@@ -77,14 +77,16 @@
# For Image custom fields we also show a thumbnail here.
return sub {
my $values = $_[0]->CustomFieldValues($field);
- return map {
+ my @values = map {
(
($_->CustomFieldObj->Type eq 'Image')
? \($m->scomp( '/Elements/ShowCustomFieldImage', Object => $_ ))
: $_->Content
),
\'<br />',
- } @{ $values->ItemsArrayRef }
+ } @{ $values->ItemsArrayRef };
+ pop @values; # Remove that last <br />
+ return @values;
};
}
}
Modified: rt/branches/3.7-EXPERIMENTAL/html/Elements/SetupSessionCookie
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Elements/SetupSessionCookie (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Elements/SetupSessionCookie Mon Sep 18 10:46:32 2006
@@ -48,9 +48,9 @@
use RT::Interface::Web::Session;
-my %cookies = CGI::Cookie->fetch;
-my $cookiename = "RT_SID_".RT->Config->Get('rtname');
-$cookiename .= ".".$ENV{'SERVER_PORT'} if $ENV{'SERVER_PORT'};
+my %cookies = CGI::Cookie->fetch;
+my $cookiename = "RT_SID_". RT->Config->Get('rtname');
+$cookiename .= ".". $ENV{'SERVER_PORT'} if $ENV{'SERVER_PORT'};
$SessionCookie ||= ( $cookies{$cookiename} ? $cookies{$cookiename}->value : undef ),
tie %session, 'RT::Interface::Web::Session', $SessionCookie;
@@ -73,12 +73,13 @@
my $cookie = new CGI::Cookie(
-name => $cookiename,
-value => $session{_session_id},
- -path => '/',
+ -path => scalar RT->Config->Get('WebPath'),
+ -secure => (scalar RT->Config->Get('WebSecureCookies') ? 1 :0),
);
$r->headers_out->{'Set-Cookie'} = $cookie->as_string;
}
-return();
+return ();
</%INIT>
<%ARGS>
$SessionCookie => ''
Modified: rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/LoadTextAttachments
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/LoadTextAttachments (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/LoadTextAttachments Mon Sep 18 10:46:32 2006
@@ -80,7 +80,9 @@
$attachments->Limit ( FIELD => 'ContentType', OPERATOR => '=', VALUE => 'text/plain');
$attachments->Limit ( FIELD => 'ContentType', OPERATOR => 'STARTSWITH', VALUE => 'message/');
$attachments->Limit ( FIELD => 'ContentType', OPERATOR => '=', VALUE => 'text');
-
+ if ($RT::SuppressInlineTextFiles) {
+ $attachments->Limit ( FIELD => 'Filename', OPERATOR => 'IS', VALUE => 'NULL');
+ }
}
return ($attachments);
</%INIT>
Modified: rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowTransactionAttachments
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowTransactionAttachments (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/ShowTransactionAttachments Mon Sep 18 10:46:32 2006
@@ -74,6 +74,7 @@
# If it's text
if ( $message->ContentType =~ m{^(text|message)}i
+ && !( $message->Filename && RT->Config->Get('SuppressInlineTextFiles', $session{'CurrentUser'} ) )
&& ( !RT->Config->Get( 'MaxInlineBody', $session{'CurrentUser'} )
|| $size <= RT->Config->Get('MaxInlineBody', $session{'CurrentUser'} ) ) )
{
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT.pm.in
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT.pm.in (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT.pm.in Mon Sep 18 10:46:32 2006
@@ -113,6 +113,12 @@
$Config = new RT::Config;
$Config->LoadConfigs;
require RT::I18N;
+
+
+ # RT::Essentials mistakenly recommends that WebPath be set to '/'.
+ # If the user does that, do what they mean.
+ $RT::WebPath = '' if ($RT::WebPath eq '/');
+
RT::I18N->Init;
}
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Action/SendEmail.pm
==============================================================================
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Ticket_Overlay.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Ticket_Overlay.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Ticket_Overlay.pm Mon Sep 18 10:46:32 2006
@@ -2115,7 +2115,7 @@
my $time = shift || 0;
unless ( $self->CurrentUserHasRight('ModifyTicket') ) {
- return ( 0, self->loc("Permission Denied") );
+ return ( 0, $self->loc("Permission Denied") );
}
#We create a date object to catch date weirdness
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Tickets_Overlay.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Tickets_Overlay.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Tickets_Overlay.pm Mon Sep 18 10:46:32 2006
@@ -711,14 +711,36 @@
$self->_OpenParen;
#Search for the right field
- $self->_SQLLimit(
- ALIAS => $self->{_sql_trattachalias},
- FIELD => $field,
- OPERATOR => $op,
- VALUE => $value,
- CASESENSITIVE => 0,
- @rest
- );
+ if ($field eq 'Content' and $RT::DontSearchFileAttachments) {
+ $self->_SQLLimit(
+ ALIAS => $self->{_sql_trattachalias},
+ FIELD => 'Filename',
+ OPERATOR => 'IS',
+ VALUE => 'NULL',
+ SUBCLAUSE => 'contentquery',
+ ENTRYAGGREGATOR => 'AND',
+ );
+ $self->_SQLLimit(
+ ALIAS => $self->{_sql_trattachalias},
+ FIELD => $field,
+ OPERATOR => $op,
+ VALUE => $value,
+ CASESENSITIVE => 0,
+ @rest,
+ ENTRYAGGREGATOR => 'AND',
+ SUBCLAUSE => 'contentquery',
+ );
+ } else {
+ $self->_SQLLimit(
+ ALIAS => $self->{_sql_trattachalias},
+ FIELD => $field,
+ OPERATOR => $op,
+ VALUE => $value,
+ CASESENSITIVE => 0,
+ ENTRYAGGREGATOR => 'AND',
+ @rest
+ );
+ }
$self->_SQLJoin(
ALIAS1 => $self->{_sql_trattachalias},
Modified: rt/branches/3.7-EXPERIMENTAL/sbin/rt-test-dependencies.in
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/sbin/rt-test-dependencies.in (original)
+++ rt/branches/3.7-EXPERIMENTAL/sbin/rt-test-dependencies.in Mon Sep 18 10:46:32 2006
@@ -166,6 +166,7 @@
DBI 1.37
Test::Inline
Class::ReturnValue 0.40
+Date::Format
DBIx::SearchBuilder 1.39
Text::Template
File::Spec 0.8
More information about the Rt-commit
mailing list