Changeset 801 for trunk/cgi-bin/search.cgi
- Timestamp:
- 12/24/15 13:14:27 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/search.cgi
r670 r801 71 71 72 72 # Set up some globals 73 $ENV{HTML_TEMPLATE_ROOT} = $thingroot."templates"; 73 $ENV{HTML_TEMPLATE_ROOT} = $thingroot; 74 my @templatepath = [ "localtemplates", "templates" ]; 74 75 75 76 my $page; 76 77 if (!defined($webvar{stype})) { 77 78 $webvar{stype} = "<NULL>"; #shuts up the warnings. 78 $page = HTML::Template->new(filename => "search/compsearch.tmpl" );79 $page = HTML::Template->new(filename => "search/compsearch.tmpl", path => @templatepath); 79 80 } else { 80 $page = HTML::Template->new(filename => "search/sresults.tmpl", global_vars => 1 );81 $page = HTML::Template->new(filename => "search/sresults.tmpl", global_vars => 1, path => @templatepath); 81 82 $page->param(webpath => $IPDB::webpath); 82 83 } 83 84 84 my $header = HTML::Template->new(filename => "header.tmpl" );85 my $header = HTML::Template->new(filename => "header.tmpl", path => @templatepath); 85 86 $header->param(version => $IPDB::VERSION); 86 87 $header->param(addperm => $IPDBacl{$authuser} =~ /a/); … … 94 95 # Handle the DB error first 95 96 if (!$ip_dbh) { 96 $page = HTML::Template->new(filename => "dberr.tmpl" );97 $page = HTML::Template->new(filename => "dberr.tmpl", path => @templatepath); 97 98 $page->param(errmsg => $errstr); 98 99 } elsif ($webvar{stype} eq 'q') { … … 314 315 315 316 # We print the footer here, so we don't have to do it elsewhere. 316 my $footer = HTML::Template->new(filename => "footer.tmpl" );317 my $footer = HTML::Template->new(filename => "footer.tmpl", path => @templatepath); 317 318 # include the admin tools link in the output? 318 319 $footer->param(adminlink => ($IPDBacl{$authuser} =~ /A/));
Note:
See TracChangeset
for help on using the changeset viewer.