The list of template paths may have the same path added multiple times,
depending on the Apache configuration. Trim them down to a unique set
to avoid excess template lookups.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Conflicts:
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
Signed-off-by: Mike Rylander <mrylander@gmail.com>
use Apache2::Log;
use OpenSRF::EX qw(:try);
use OpenILS::Utils::CStoreEditor q/:funcs/;
+use List::MoreUtils qw/uniq/;
use constant OILS_HTTP_COOKIE_SKIN => 'eg_skin';
use constant OILS_HTTP_COOKIE_THEME => 'eg_theme';
$ctx->{theme} = $cgi->cookie(OILS_HTTP_COOKIE_THEME) || 'default';
$ctx->{proto} = $cgi->https ? 'https' : 'http';
- my @template_paths = $r->dir_config->get('OILSWebTemplatePath');
+ my @template_paths = uniq $r->dir_config->get('OILSWebTemplatePath');
$ctx->{template_paths} = [ reverse @template_paths ];
my %locales = $r->dir_config->get('OILSWebLocale');