|
From: OryNider <ory...@us...> - 2008-03-08 02:53:24
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19580 Modified Files: mx_functions_style.php Log Message: this is a big bug wich was discovered in save mode by me ;) Index: mx_functions_style.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_style.php,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** mx_functions_style.php 27 Feb 2008 21:27:11 -0000 1.56 --- mx_functions_style.php 8 Mar 2008 02:53:18 -0000 1.57 *************** *** 153,157 **** function mx_Template($root = '.') { ! parent::Template($root); } --- 153,158 ---- function mx_Template($root = '.') { ! $this->root = $root; ! parent::Template($this->root); } *************** *** 311,318 **** --- 312,350 ---- $filename = $mx_root_path . 'templates/' . $mx_user->default_template_name . '/' . $filename2; } + // + // Look at Custom Root folder..............this is used my mx_mod installers too.......this does not use standard templates folders wich are set when the template was re-initialized and defined as custom var + // else if( file_exists( $this->root . '/' . $filename) ) { $filename = $this->root . '/' . $filename; } + if( file_exists($this->root . '/' . $style_path . '/' . $filename) ) + { + // + // First check current template + // + $filename = $this->root . '/' . $style_path . '/' . $filename; + } + else if( file_exists($this->root . '/' . $style_path . '/' . $filename2) ) + { + // + // tpl - html + // + $filename = $this->root. '/' . $style_path . '/' . $filename2; + } + else if( file_exists($this->root . '/' . $mx_user->default_template_name . '/' . $filename) ) + { + // + // Then check current template + // + $filename = $mx_root_path . '/' . $mx_user->default_template_name . '/' . $filename; + } + else if( file_exists($this->root . '/' . $moduleDefault . '/' . $filename) ) + { + // + // Finally check the Custom Root folde(for compatibility with some old modules) + // + $filename = $this->root . '/' . $moduleDefault . '/' . $filename; + } else { *************** *** 411,415 **** if( !file_exists($filename) ) { ! die("Template->make_filename(): Error - file $filename does not exist. <br />Module: $module_root_path <br />Current style: $style_path <br />Cloned style: $mx_user->cloned_template_name <br />Default style: $mx_user->default_template_name <br />Custom module default style: $moduleDefault"); } } --- 443,447 ---- if( !file_exists($filename) ) { ! die("Template->make_filename(): Error - file $filename does not exist. <br />Class-Root: $this->root <br />Module: $module_root_path <br />Current style: $style_path <br />Cloned style: $mx_user->cloned_template_name <br />Default style: $mx_user->default_template_name <br />Custom module default style: $moduleDefault"); } } |