[Codestriker-commits] CVS update: codestriker/template/en/default viewtopicproperties.html.tmpl
Brought to you by:
sits
|
From: <si...@us...> - 2008-02-23 02:28:27
|
User: sits
Date: 08/02/22 18:28:09
Modified: lib/Codestriker/Action ListTopics.pm
template/en/default viewtopicproperties.html.tmpl
Log:
Handle situation where bugs have been associated with a topic, but
$Codestriker::bugtracker has not been defined. From Rob.
Index: ListTopics.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Action/ListTopics.pm,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- ListTopics.pm 21 Dec 2004 23:02:55 -0000 1.30
+++ ListTopics.pm 23 Feb 2008 02:28:09 -0000 1.31
@@ -146,10 +146,14 @@
# bug ids
my @accum_bugs = split /, /, $topic->{bug_ids};
- for ( my $index = 0; $index < scalar(@accum_bugs); ++$index) {
- $accum_bugs[$index] =
- $query->a({href=>"$Codestriker::bugtracker$accum_bugs[$index]"},
- $accum_bugs[$index]);
+ for (my $index = 0; $index < scalar(@accum_bugs); ++$index) {
+ # Allow for no direct web link to a bug.
+ if (defined $Codestriker::bugtracker &&
+ $Codestriker::bugtracker ne '') {
+ $accum_bugs[$index] =
+ $query->a({href=>"$Codestriker::bugtracker$accum_bugs[$index]"},
+ $accum_bugs[$index]);
+ }
}
$template_topic->{'bugids'} = join ', ', @accum_bugs;
Index: viewtopicproperties.html.tmpl
===================================================================
RCS file: /cvsroot/codestriker/codestriker/template/en/default/viewtopicproperties.html.tmpl,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- viewtopicproperties.html.tmpl 23 Feb 2008 02:21:57 -0000 1.25
+++ viewtopicproperties.html.tmpl 23 Feb 2008 02:28:09 -0000 1.26
@@ -84,7 +84,11 @@
Links:
[% FOREACH bug = bug_id_array %]
[% IF loop.count() != 1 %], [% END %]
- <a href="[% bugtracker %][% bug %]">Bug [% bug %]</a>
+ [% IF bugtracker != "" %]
+ <a href="[% bugtracker %][% bug %]">Bug [% bug %]</a>
+ [% ELSE %]
+ Bug [% bug %]
+ [% END %]
[% END %]
</td>
</tr>
|