From aba007e2c5bfb56e94505d41fd823ca246775e75 Mon Sep 17 00:00:00 2001 From: Alex Schroeder Date: Sat, 26 Apr 2008 00:54:27 +0000 Subject: [PATCH] () new var to set the label of tag list (DoListTags) change var name from to --- modules/listtags.pl | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/modules/listtags.pl b/modules/listtags.pl index 9d5f6d85..61e29eae 100644 --- a/modules/listtags.pl +++ b/modules/listtags.pl @@ -15,10 +15,15 @@ # Free Software Foundation, Inc. # 59 Temple Place, Suite 330 # Boston, MA 02111-1307 USA -# For user doc, see -# http://www.oddmuse.org/cgi-bin/oddmuse/ListTags_Extension -$ModulesDescription .= '

$Id: listtags.pl,v 1.2 2008/04/25 16:34:33 weakish Exp $

'; + +$ModulesDescription .= '

$Id: listtags.pl,v 1.3 2008/04/26 00:54:27 weakish Exp $

'; + +# This action is similar with list action + +use vars qw($TagListLabel); + +$TagListLabel = "tag:"; push(@MyRules, \&ListTagRule); @@ -35,7 +40,7 @@ sub ListTagRule { } @tags; $tags = join ', ', @tags; return CloseHtmlEnvironments() - . "
Tags: $tags
" + . "
$TagListLabel $tags
" . AddHtmlEnvironment('p'); } return undef; @@ -46,11 +51,11 @@ $Action{taglist} = \&DoTagList; sub DoTagList { my $id = shift; my $search = GetParam('search', ''); -my $taglabel = $search; - $taglabel =~ s/\|.*//; - $taglabel =~ s/\\\[.*\(//; +my $currenttag = $search; + $currenttag =~ s/\|.*//; + $currenttag =~ s/\\\[.*\(//; ReportError(T('The search parameter is missing.')) unless $search; - print GetHeader('', Ts('Pages tagged with %s', $taglabel), ''); + print GetHeader('', Ts('Pages tagged with %s', $currenttag), ''); local (%Page, $OpenPageName); my %hash = (); foreach my $id (SearchTitleAndBody($search)) {