Commit ce913d52 authored by Christian Loos's avatar Christian Loos
Browse files

don't sort status and lookup a component if we don't need it

If we know we are not showing any requestor tickets there is no need for status
sorting and component lookups.
parent 745da695
......@@ -164,17 +164,18 @@ $m->callback( CallbackName => 'AddStatus', status_link_text => \$status_link_tex
$ShowTickets = 0 if $DefaultTicketsTab eq 'None';
unless ( $DefaultTicketsTab eq 'None' ) {
my $TicketTemplate;
if ($ShowTickets) {
for (0 .. (@$status_order - 1)) {
$selected = $_ && last
if $status_order->[$_] eq $DefaultTicketsTab;
}
}
my $TicketTemplate = "ShowRequestorTickets$DefaultTicketsTab";
$TicketTemplate = "ShowRequestorTicketsActive"
unless RT::Interface::Web->ComponentPathIsSafe($TicketTemplate)
and $m->comp_exists($TicketTemplate);
$TicketTemplate = "ShowRequestorTickets$DefaultTicketsTab";
$TicketTemplate = "ShowRequestorTicketsActive"
unless RT::Interface::Web->ComponentPathIsSafe($TicketTemplate)
and $m->comp_exists($TicketTemplate);
}
</%INIT>
<%ARGS>
$Ticket=>undef
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment