[Rt-commit] r11202 - in rtfm/branches/2.3-EXPERIMENTAL: .
falcone at bestpractical.com
falcone at bestpractical.com
Wed Mar 26 13:27:01 EDT 2008
Author: falcone
Date: Wed Mar 26 13:26:59 2008
New Revision: 11202
Modified:
rtfm/branches/2.3-EXPERIMENTAL/ (props changed)
rtfm/branches/2.3-EXPERIMENTAL/html/RTFM/Elements/ShowTopic
Log:
r30546 at ketch: falcone | 2008-03-26 10:24:39 -0400
* handle global topics by using classid = 0
Modified: rtfm/branches/2.3-EXPERIMENTAL/html/RTFM/Elements/ShowTopic
==============================================================================
--- rtfm/branches/2.3-EXPERIMENTAL/html/RTFM/Elements/ShowTopic (original)
+++ rtfm/branches/2.3-EXPERIMENTAL/html/RTFM/Elements/ShowTopic Wed Mar 26 13:26:59 2008
@@ -47,7 +47,9 @@
%# END BPS TAGGED BLOCK }}}
% for (@path) {
-<% $_->ParentObj->Id ? " > " : "" %><a href="<% $RT::WebPath %>/RTFM/Topics.html?class=<% $_->ObjectId %>&id=<% $_->Id %>"><% $_->Name || loc("(no name)") %></a>
+%# this isn't always a class, it can be the system object
+% my $class_id = ($_->ObjectType eq 'RT::FM::Class' ? $_->ObjectId : 0 );
+<% $_->ParentObj->Id ? " > " : "" %><a href="<% $RT::WebPath %>/RTFM/Topics.html?class=<% $class_id %>&id=<% $_->Id %>"><% $_->Name || loc("(no name)") %></a>
% }
<%args>
@@ -60,4 +62,4 @@
unshift @path, $topic;
$topic = $topic->ParentObj;
}
-</%init>
\ No newline at end of file
+</%init>
More information about the Rt-commit
mailing list