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

(-)a/C4/Templates.pm (-4 / +7 lines)
Lines 256-269 sub themelanguage { Link Here
256
    my $fallback =   C4::Context->preference( ($interface eq 'intranet') ? 'template' : 'OPACFallback' );
256
    my $fallback =   C4::Context->preference( ($interface eq 'intranet') ? 'template' : 'OPACFallback' );
257
    push @themes, $fallback;
257
    push @themes, $fallback;
258
258
259
    # Try to find first theme for the selected language
259
    # Try to find first theme for the selected theme/lang, then for fallback/lang
260
    for my $theme (@themes) {
260
    for my $theme (@themes) {
261
        if ( -e "$htdocs/$theme/$lang/modules/$tmpl" ) {
261
        if ( -e "$htdocs/$theme/$lang/modules/$tmpl" ) {
262
            return ($theme, $lang, \@themes);
262
            return ($theme, $lang, \@themes);
263
        }
263
        }
264
    }
264
    }
265
    # Otherwise, return fallback theme in English 'en'
265
    # Otherwise return theme/'en', last resort fallback/'en'
266
    return ($fallback, 'en', \@themes);
266
    for my $theme (@themes) {
267
        if ( -e "$htdocs/$theme/en/modules/$tmpl" ) {
268
            return ($theme, 'en', \@themes);
269
        }
270
    }
267
}
271
}
268
272
269
273
270
- 

Return to bug 12539