Index: trunk/core/kernel/utility/http_query.php =================================================================== diff -u -r3850 -r3872 --- trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 3850) +++ trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 3872) @@ -438,7 +438,19 @@ do { $template_path = implode('/', $template_parts); - + + /*if (!preg_match('/(.*)\/(.*)$/', $template_path, $t_parts)) { + $t_parts[1] = ''; + $t_parts[2] = $template_path; + } + else { + $t_parts[1] = '/'.$t_parts[1]; + } + + $sql = 'SELECT FileId + FROM '.TABLE_PREFIX.'ThemeFiles + WHERE (FilePath = '.$this->Conn->qstr($t_parts[1]).') AND (FileName = '.$this->Conn->qstr($t_parts[2].'.tpl').')';*/ + $sql = 'SELECT FileId FROM '.TABLE_PREFIX.'ThemeFiles WHERE CONCAT(FilePath, "/", FileName) = '.$this->Conn->qstr('/'.$template_path.'.tpl'); $template_found = $this->Conn->GetOne($sql); if(!$template_found)