Index: trunk/core/kernel/utility/http_query.php =================================================================== diff -u -N -r3872 -r3879 --- trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 3872) +++ trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 3879) @@ -439,19 +439,14 @@ { $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]; - } + $t_parts['path'] = dirname($template_path) == '.' ? '' : '/'.dirname($template_path); + $t_parts['file'] = basename($template_path); $sql = 'SELECT FileId FROM '.TABLE_PREFIX.'ThemeFiles - WHERE (FilePath = '.$this->Conn->qstr($t_parts[1]).') AND (FileName = '.$this->Conn->qstr($t_parts[2].'.tpl').')';*/ + WHERE (FilePath = '.$this->Conn->qstr($t_parts['path']).') AND (FileName = '.$this->Conn->qstr($t_parts['file'].'.tpl').')'; - $sql = 'SELECT FileId FROM '.TABLE_PREFIX.'ThemeFiles WHERE CONCAT(FilePath, "/", FileName) = '.$this->Conn->qstr('/'.$template_path.'.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) {