This is not really a bug, but I think it will lead to bugs.
This code fragment is repeated throughout...with subtle
variations and inconsistencies:
/* Templates */
$default_template = "xxxxxx.tpl";
if( empty($tpl) ) {
$tpl = $default_template;
} elseif ( file_exists($_PSL['templatedir'] . "/" .
basename($tpl) . ".tpl") ) {
$tpl = basename($tpl) . ".tpl";
} else {
debug ( "xxxxx:Template file doesn't exist, using
default instead", $tpl);
$tpl = $default_template;
}
How about replacing it with something in function.inc,
or in a phpSlash base class?
Idally, it would look for $tpl
- in the current skin for the current language
- in the current skin for the default language
before falling back to default_template.
P
Logged In: YES
user_id=77269
> How about replacing it with something in function.inc,
This sounds like an excellent idea. There is another
inconsistency - some classes load all the templates in the
constructor, so the above code has references to a template
array variable.
> Idally, it would look for $tpl
> - in the current skin for the current language
> - in the current skin for the default language
> before falling back to default_template.
excellent idea.
Logged In: YES
user_id=77269
Moved to feature request.
Logged In: YES
user_id=77269
Most of this code was moved into slashTemplate( set_file).
It checks the current skin and if not found looks in the
parent skin ( if applicable).