Index: branches/5.2.x/core/kernel/db/cat_dbitem.php =================================================================== diff -u -N -r14898 -r15012 --- branches/5.2.x/core/kernel/db/cat_dbitem.php (.../cat_dbitem.php) (revision 14898) +++ branches/5.2.x/core/kernel/db/cat_dbitem.php (.../cat_dbitem.php) (revision 15012) @@ -1,6 +1,6 @@ GetDBField('ResourceId').') AND (DefaultImg = 1)'; $image_data = $this->Conn->GetRow($sql); if (!$image_data) { // 2. no primary image, then get image with name "main" $sql = 'SELECT * - FROM '.TABLE_PREFIX.'Images + FROM '.TABLE_PREFIX.'CatalogImages WHERE (ResourceId = '.$this->GetDBField('ResourceId').') AND (Name = "main")'; $image_data = $this->Conn->GetRow($sql); }