Lines 187-195
sub badtemplatecheck {
Link Here
|
187 |
# This also includes two dots |
187 |
# This also includes two dots |
188 |
Koha::Exceptions::NoPermission->throw( 'bad template path' ); |
188 |
Koha::Exceptions::NoPermission->throw( 'bad template path' ); |
189 |
} else { |
189 |
} else { |
190 |
# Check allowed dirs |
190 |
# Check allowed dirs - make sure we operate on a copy of the config |
191 |
my $dirs = C4::Context->config("pluginsdir"); |
191 |
my $dirs = C4::Context->config("pluginsdir"); |
192 |
$dirs = [ $dirs ] if !ref($dirs); |
192 |
if ( !ref($dirs) ) { |
|
|
193 |
$dirs = [ $dirs ]; |
194 |
} |
195 |
else { |
196 |
$dirs = [ @$dirs ]; |
197 |
} |
193 |
unshift @$dirs, C4::Context->config('opachtdocs'), C4::Context->config('intrahtdocs'); |
198 |
unshift @$dirs, C4::Context->config('opachtdocs'), C4::Context->config('intrahtdocs'); |
194 |
my $found = 0; |
199 |
my $found = 0; |
195 |
foreach my $dir ( @$dirs ) { |
200 |
foreach my $dir ( @$dirs ) { |
196 |
- |
|
|