[Rt-commit] r13472 - in rt/3.8/trunk/share/html/Ticket/Graphs: .

ruz at bestpractical.com ruz at bestpractical.com
Fri Jun 20 16:37:00 EDT 2008


Author: ruz
Date: Fri Jun 20 16:36:59 2008
New Revision: 13472

Modified:
   rt/3.8/trunk/share/html/Ticket/Graphs/Elements/ShowGraph
   rt/3.8/trunk/share/html/Ticket/Graphs/dhandler

Log:
* delete last code that was handling Type of graphs

Modified: rt/3.8/trunk/share/html/Ticket/Graphs/Elements/ShowGraph
==============================================================================
--- rt/3.8/trunk/share/html/Ticket/Graphs/Elements/ShowGraph	(original)
+++ rt/3.8/trunk/share/html/Ticket/Graphs/Elements/ShowGraph	Fri Jun 20 16:36:59 2008
@@ -45,13 +45,12 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<div><img src="<% RT->Config->Get('WebPath') %>/Ticket/Graphs/<% $Type %>/<% $id %>?<% $m->comp('/Elements/QueryString', %ARGS) %>" usemap="#<% $graph->{'NAME'} || 'test' %>" style="border: none" />
+<div><img src="<% RT->Config->Get('WebPath') %>/Ticket/Graphs/<% $id %>?<% $m->comp('/Elements/QueryString', %ARGS) %>" usemap="#<% $graph->{'NAME'} || 'test' %>" style="border: none" />
 <% safe_run_child { Encode::decode_utf8( $graph->as_cmapx ) } |n %>
 </div>
 <& ShowLegends, %ARGS, Ticket => $ticket &>
 <%ARGS>
-$id => undef;
-$Type => 'Links',
+$id => undef
 </%ARGS>
 <%INIT>
 my $ticket = RT::Ticket->new( $session{'CurrentUser'} );
@@ -62,15 +61,8 @@
 }
 $ARGS{'id'} = $id = $ticket->id;
 
-$Type = ucfirst lc $Type;
-unless ( $Type eq 'Links' || $Type eq 'Members' ) {
-    $RT::Logger->error("'$Type' is incorrect type of ticket graph");
-    $Type = 'Links';
-}
-
 require RT::Graph::Tickets;
-my $method = 'Ticket'. $Type;
-my $graph = RT::Graph::Tickets->$method(
+my $graph = RT::Graph::Tickets->TicketLinks(
     %ARGS,
     Ticket => $ticket,
 );

Modified: rt/3.8/trunk/share/html/Ticket/Graphs/dhandler
==============================================================================
--- rt/3.8/trunk/share/html/Ticket/Graphs/dhandler	(original)
+++ rt/3.8/trunk/share/html/Ticket/Graphs/dhandler	Fri Jun 20 16:36:59 2008
@@ -48,9 +48,9 @@
 <%INIT>
 my $arg = $m->dhandler_arg;
 
-my ($type, $id);
-if ( $arg =~ m{^(Members|Links)/(\d+)$}i ) {
-    ($type, $id) = ($1, $2);
+my $id;
+if ( $arg =~ m{^(\d+)$}i ) {
+    ($id) = ($1);
 } else {
     return $m->abort( 404 );
 }
@@ -63,8 +63,7 @@
 }
 
 require RT::Graph::Tickets;
-my $method = 'Ticket'. ucfirst lc $type;
-my $graph = RT::Graph::Tickets->$method(
+my $graph = RT::Graph::Tickets->TicketLinks(
     %ARGS,
     Ticket => $ticket,
 );


More information about the Rt-commit mailing list