Index: trunk/kernel/include/theme.php =================================================================== diff -u -r375 -r384 --- trunk/kernel/include/theme.php (.../theme.php) (revision 375) +++ trunk/kernel/include/theme.php (.../theme.php) (revision 384) @@ -194,7 +194,7 @@ $this->Clear(); $this->ThemeId=$id; $sql = "SELECT * FROM ".$this->SourceTable. " WHERE ThemeId=$id "; - if(strlen(trim($where))) $sql .= $where." "; + if(strlen(trim($where))) $sql .= ' AND '.$where." "; if(strlen(trim($orderBy))) $sql .= "ORDER BY $orderBy"; if(strlen(trim($limit))) $sql .= $limit;