]> git.uio.no Git - usit-rt.git/blobdiff - share/html/Ticket/Elements/ShowRequestor
Master to 4.2.8
[usit-rt.git] / share / html / Ticket / Elements / ShowRequestor
index a9f89a10302b1297d7b64fc764881c270c4d61b1..5bfa0f925bc643eec3b913edafc27ecbb5179259 100644 (file)
@@ -162,17 +162,20 @@ my $status_link_text = {Active   => loc('Active Tickets'),
 my $status_order = [qw/Active Inactive All/];
 $m->callback( CallbackName => 'AddStatus', status_link_text => \$status_link_text, status_order => \$status_order );
 
-unless ( $DefaultTicketsTab eq 'None' ) {
+$ShowTickets = 0 if $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