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

(-)a/C4/Templates.pm (-4 / +3 lines)
Lines 256-273 sub themelanguage { Link Here
256
    my $where = $tmpl =~ /xsl$/ ? 'xslt' : 'modules';
256
    my $where = $tmpl =~ /xsl$/ ? 'xslt' : 'modules';
257
    for my $theme (@themes) {
257
    for my $theme (@themes) {
258
        if ( -e "$htdocs/$theme/$lang/$where/$tmpl" ) {
258
        if ( -e "$htdocs/$theme/$lang/$where/$tmpl" ) {
259
            return ( $theme, $lang, uniq( \@themes ) );
259
            return ( $theme, $lang, [ uniq(@themes) ] );
260
        }
260
        }
261
    }
261
    }
262
    # Otherwise return theme/'en', last resort fallback/'en'
262
    # Otherwise return theme/'en', last resort fallback/'en'
263
    for my $theme (@themes) {
263
    for my $theme (@themes) {
264
        if ( -e "$htdocs/$theme/en/$where/$tmpl" ) {
264
        if ( -e "$htdocs/$theme/en/$where/$tmpl" ) {
265
            return ( $theme, 'en', uniq( \@themes ) );
265
            return ( $theme, 'en', [ uniq(@themes) ] );
266
        }
266
        }
267
    }
267
    }
268
    # tmpl is a full path, so this is a template for a plugin
268
    # tmpl is a full path, so this is a template for a plugin
269
    if ( $tmpl =~ /^\// && -e $tmpl ) {
269
    if ( $tmpl =~ /^\// && -e $tmpl ) {
270
        return ( $themes[0], $lang, uniq( \@themes ) );
270
        return ( $themes[0], $lang, [ uniq(@themes) ] );
271
    }
271
    }
272
}
272
}
273
273
274
- 

Return to bug 17982