View | Details | Raw Unified | Return to bug 28303
Collapse All | Expand All

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

Return to bug 28303