Index: trunk/core/kernel/utility/http_query.php =================================================================== diff -u -N -r4636 -r4637 --- trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 4636) +++ trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 4637) @@ -505,7 +505,9 @@ $sql = 'SELECT FileId FROM '.TABLE_PREFIX.'ThemeFiles - WHERE (FilePath = '.$this->Conn->qstr($t_parts['path']).') AND (FileName = '.$this->Conn->qstr($t_parts['file'].'.tpl').')'; + WHERE (FilePath = '.$this->Conn->qstr($t_parts['path']).') AND + (FileName = '.$this->Conn->qstr($t_parts['file'].'.tpl').') AND + (ThemeId = '.$this->Get('m_theme').')'; // $sql = 'SELECT FileId FROM '.TABLE_PREFIX.'ThemeFiles WHERE CONCAT(FilePath, "/", FileName) = '.$this->Conn->qstr('/'.$template_path.'.tpl'); $template_found = $this->Conn->GetOne($sql);