Index: cat_event_handler.php =================================================================== --- cat_event_handler.php (revision 14239) +++ cat_event_handler.php (working copy) @@ -943,18 +943,20 @@ $object->Fields['Status']['options'] = $new_options; } - // linking existing images for item with virtual fields - $image_helper =& $this->Application->recallObject('ImageHelper'); - /* @var $image_helper ImageHelper */ + if ( !$this->Application->isAdmin ) { + // linking existing images for item with virtual fields + $image_helper =& $this->Application->recallObject('ImageHelper'); + /* @var $image_helper ImageHelper */ + + $image_helper->LoadItemImages($object); + + // linking existing files for item with virtual fields + $file_helper =& $this->Application->recallObject('FileHelper'); + /* @var $file_helper FileHelper */ + + $file_helper->LoadItemFiles($object); + } - $image_helper->LoadItemImages($object); - - // linking existing files for item with virtual fields - $file_helper =& $this->Application->recallObject('FileHelper'); - /* @var $file_helper FileHelper */ - - $file_helper->LoadItemFiles($object); - // set item's additional categories to virtual field (used in editing) $item_categories = $this->getItemCategories($object->GetDBField('ResourceId')); $object->SetDBField('MoreCategories', $item_categories ? '|'.implode('|', $item_categories).'|' : ''); @@ -971,7 +973,7 @@ $object =& $event->getObject(); /* @var $object kDBItem */ - if (!$this->Application->isAdminUser) { + if ( !$this->Application->isAdmin ) { $image_helper =& $this->Application->recallObject('ImageHelper'); /* @var $image_helper ImageHelper */ @@ -1015,7 +1017,7 @@ $this->setCustomExportColumns($event); } - if (!$this->Application->isAdminUser) { + if ( !$this->Application->isAdmin ) { $object =& $event->getObject(); /* @var $object kDBItem */ @@ -2602,12 +2604,14 @@ return ; } - $file_helper =& $this->Application->recallObject('FileHelper'); - /* @var $file_helper FileHelper */ + if ( !$this->Application->isAdmin ) { + $file_helper =& $this->Application->recallObject('FileHelper'); + /* @var $file_helper FileHelper */ + + $file_helper->createItemFiles($event->Prefix, true); // create image fields + $file_helper->createItemFiles($event->Prefix, false); // create file fields + } - $file_helper->createItemFiles($event->Prefix, true); // create image fields - $file_helper->createItemFiles($event->Prefix, false); // create file fields - $this->changeSortings($event); // add grids for advanced view (with primary category column)