[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.9.4-26-g9c250a4
Jesse Vincent
jesse at bestpractical.com
Wed Sep 29 23:32:22 EDT 2010
The branch, 3.9-trunk has been updated
via 9c250a491880e31b81979d589603cccc3c481a92 (commit)
via 595021afdaf71d7523f24e4453faf828d7a38f3f (commit)
from e5cef164ede9e82d6bf3cf8a0a26d2658d388893 (commit)
Summary of changes:
lib/RT/Ticket_Overlay.pm | 42 +++++++++++++++++++++++++++------------
share/html/Elements/Header | 6 +----
share/html/NoAuth/css/site.css | 4 +++
3 files changed, 34 insertions(+), 18 deletions(-)
create mode 100644 share/html/NoAuth/css/site.css
- Log -----------------------------------------------------------------
commit 595021afdaf71d7523f24e4453faf828d7a38f3f
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Wed Sep 29 23:19:07 2010 -0400
Switch TransactionAddresses to try key from the attachments table.
for hopefully fewer heavy sql queries
diff --git a/lib/RT/Ticket_Overlay.pm b/lib/RT/Ticket_Overlay.pm
index 7c5488c..36c6424 100755
--- a/lib/RT/Ticket_Overlay.pm
+++ b/lib/RT/Ticket_Overlay.pm
@@ -1622,20 +1622,36 @@ sub TransactionAddresses {
my $txns = $self->Transactions;
my %addresses = ();
- foreach my $type (qw(Create Comment Correspond)) {
- $txns->Limit(FIELD => 'Type', OPERATOR => '=', VALUE => $type , ENTRYAGGREGATOR => 'OR', CASESENSITIVE => 1);
- }
- while (my $txn = $txns->Next) {
- my $txnaddrs = $txn->Addresses;
- foreach my $addrlist ( values %$txnaddrs ) {
- foreach my $addr (@$addrlist) {
- # Skip addresses without a phrase (things that are just raw addresses) if we have a phrase
- next if ($addresses{$addr->address} && $addresses{$addr->address}->phrase && not $addr->phrase);
- # skips "comment-only" addresses
- next unless ($addr->address);
- $addresses{$addr->address} = $addr;
- }
+ my $attachments = RT::Attachments->new( $self->CurrentUser );
+ $attachments->LimitByTicket( $self->id );
+ $attachments->Columns( qw( id Headers TransactionId));
+
+
+ foreach my $type (qw(Create Comment Correspond)) {
+ $attachments->Limit( ALIAS => $attachments->TransactionAlias,
+ FIELD => 'Type',
+ OPERATOR => '=',
+ VALUE => $type,
+ ENTRYAGGREGATOR => 'OR',
+ CASESENSITIVE => 1
+ );
+ }
+
+ while ( my $att = $attachments->Next ) {
+ foreach my $addrlist ( values %{$att->Addresses } ) {
+ foreach my $addr (@$addrlist) {
+
+# Skip addresses without a phrase (things that are just raw addresses) if we have a phrase
+ next
+ if ( $addresses{ $addr->address }
+ && $addresses{ $addr->address }->phrase
+ && not $addr->phrase );
+
+ # skips "comment-only" addresses
+ next unless ( $addr->address );
+ $addresses{ $addr->address } = $addr;
+ }
}
}
commit 9c250a491880e31b81979d589603cccc3c481a92
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Wed Sep 29 23:34:31 2010 -0400
Move site custom css out into a separate file, saving data and an sql
query on every page load
diff --git a/share/html/Elements/Header b/share/html/Elements/Header
index 920068f..fa7d9e0 100755
--- a/share/html/Elements/Header
+++ b/share/html/Elements/Header
@@ -57,6 +57,7 @@
<link rel="shortcut icon" href="<%RT->Config->Get('WebImagesURL')%>/favicon.png" type="image/png" />
<link rel="stylesheet" href="<%RT->Config->Get('WebPath')%>/NoAuth/css/<% RT->Config->Get( 'WebDefaultStylesheet', $session{'CurrentUser'} ) %>/main<% RT->Config->Get('DevelMode')? '' : '-squished' %>.css" type="text/css" media="all" />
+<link rel="stylesheet" href="<%RT->Config->Get('WebPath')%>/NoAuth/css/site.css" type="text/css" media="all" />
<link rel="stylesheet" href="<%RT->Config->Get('WebPath')%>/NoAuth/css/print.css" type="text/css" media="print" />
% for (keys %{$LinkRel || {}}) {
@@ -75,11 +76,6 @@
% if ($m->comp_exists($stylesheet_plugin) ) {
<& $stylesheet_plugin &>
% }
-% if (my $attr = $RT::System->FirstAttribute('UserCSS')) {
-<style type="text/css" media="screen">
-<% $attr->Content |n%>
-</style>
-% }
% $m->callback( %ARGS, CallbackName => 'Head' );
diff --git a/share/html/NoAuth/css/site.css b/share/html/NoAuth/css/site.css
new file mode 100644
index 0000000..491609b
--- /dev/null
+++ b/share/html/NoAuth/css/site.css
@@ -0,0 +1,4 @@
+% if (my $attr = $RT::System->FirstAttribute('UserCSS')) {
+<% $attr->Content |n%>
+% }
+% $m->abort();
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list