From d756467055959872b1a443d2c60417135b0d05e9 Mon Sep 17 00:00:00 2001 From: "gerv%gerv.net" <> Date: Wed, 8 May 2002 04:28:39 +0000 Subject: Bug 140435 - Templatise GetCommandMenu. Patch by gerv; r=bbaetz, justdave. --- globals.pl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'globals.pl') diff --git a/globals.pl b/globals.pl index f6e651e3c..d04133d10 100644 --- a/globals.pl +++ b/globals.pl @@ -486,7 +486,6 @@ sub GenerateVersionTable { } } - my $cols = LearnAboutColumns("bugs"); @::log_columns = @{$cols->{"-list-"}}; @@ -1574,6 +1573,15 @@ $::template ||= Template->new( # filter should be used for a full URL that may have # characters that need encoding. url_quote => \&url_quote , + + # Returns the text with spaces converted to non-breaking space + # HTML entities. + no_break => sub + { + my ($var) = @_; + $var =~ s/ /\ /g; + return $var; + } , } , } ) || DisplayError("Template creation failed: " . Template->error()) @@ -1756,6 +1764,8 @@ $::vars = # User Agent - useful for detecting in templates 'user_agent' => $ENV{'HTTP_USER_AGENT'} , + + 'use_votes' => $::anyvotesallowed, }; 1; -- cgit v1.2.3-24-g4f1b