Hi,
since I am doing a compare on files with regard to my current 3.6.1 production setup I notice a change/difference in my system with regard to the hTheme.php (helper file) and I wonder about the logic. This is the function latest 3.7.1:
function osc_render_file($file = '') {
if($file=='') {
$file = __get('file');
}
// Clean $file to prevent hacking of some type
osc_sanitize_url($file);
$file = str_replace("../", "", str_replace("..\\", "", str_replace("://", "", preg_replace("|http([s]*)|", "", $file))));
if(file_exists(osc_themes_path() . osc_theme() . "/plugins/" . $file)) {
include osc_themes_path() . osc_theme() . "/plugins/" . $file;
} else if(file_exists(osc_plugins_path() . $file)) {
include osc_plugins_path() . $file;
}
}
My wondering is about the if else logic, it seems the first is meant to look for a theme file and the else for a plugin file. Which is the way I have it in my system/file at this moment. However in this code the plugins folder is added to the logic in the IF which looks as if in both cases only a plugin file is used.
What do you think? (might be something I have changed in earlier version or could be a difference added in 3.7.1, I don't remember but my version of the code looks to make more sense?
Regards,
Eric