Index: branches/5.0.x/core/units/helpers/image_helper.php =================================================================== diff -u -r12306 -r12322 --- branches/5.0.x/core/units/helpers/image_helper.php (.../image_helper.php) (revision 12306) +++ branches/5.0.x/core/units/helpers/image_helper.php (.../image_helper.php) (revision 12322) @@ -1,6 +1,6 @@ Application->prefixRegistred($object->Prefix.'-img')) { + if (!$this->_canUseImages($object)) { return ; } @@ -503,7 +503,7 @@ */ function SaveItemImages(&$object) { - if (!$this->Application->prefixRegistred($object->Prefix.'-img')) { + if (!$this->_canUseImages($object)) { return ; } @@ -591,4 +591,17 @@ $fields_hash['AltName'] = (string)$object->GetDBField($field_name); } + + /** + * Checks, that item can use image upload capabilities + * + * @param kCatDBItem $object + * @return bool + */ + function _canUseImages(&$object) + { + $prefix = $object->Prefix == 'p' ? 'img' : $object->Prefix . '-img'; + + return $this->Application->prefixRegistred($prefix); + } } \ No newline at end of file