Skip to content
Snippets Groups Projects
Commit f8ed42b1 authored by deuce's avatar deuce
Browse files

If requiested template isn't found in the current theme, use the template

from the sysop-configured default theme.  If that one isn't found either,
use the one from the "Default" theme.
parent f6a5af68
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,13 @@ load("html_inc/html_themes.ssjs");
template.Theme_CSS_File=Themes[CurrTheme].css;
function write_template(filename) {
var inc=new File(system.text_dir+"html_templates"+'/'+Themes[CurrTheme].dir+'/'+filename);
var fname=system.text_dir+"html_templates"+'/'+Themes[CurrTheme].dir+'/'+filename;
if(!file_exists(fname)) {
fname=system.text_dir+"html_templates"+'/'+Themes[DefaultTheme].dir+'/'+filename;
if(!file_exists(fname))
fname=system.text_dir+"html_templates"+'/'+Themes["Default"].dir+'/'+filename;
}
var inc=new File(fname);
if(!inc.open("r",true,1024)) {
horrible_error("Cannot open template file "+system.text_dir+"html_templates"+'/'+Themes[CurrTheme].dir+'/'+filename+"!");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment