Index: trunk/core/units/general/cat_tag_processor.php =================================================================== diff -u -r8385 -r8388 --- trunk/core/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 8385) +++ trunk/core/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 8388) @@ -223,6 +223,21 @@ return $this->Application->ProcessParsedTag('c', 'CategoryLink', $params); } + + /** + * Allows to detect if item has any additional images available + * + * @param Array $params + * @return string + */ + function HasAdditionalImages($params) + { + $object =& $this->getObject($params); + $sql = 'SELECT ImageId + FROM '.$this->Application->getUnitOption('img', 'TableName').' + WHERE ResourceId = '.$object->GetDBField('ResourceId').' AND DefaultImg != 1 AND Enabled = 1'; + return $this->Conn->GetOne($sql) ? 1 : 0; + } }