Index: branches/5.2.x/core/units/images/image_event_handler.php =================================================================== diff -u -N -r14879 -r14989 --- branches/5.2.x/core/units/images/image_event_handler.php (.../image_event_handler.php) (revision 14879) +++ branches/5.2.x/core/units/images/image_event_handler.php (.../image_event_handler.php) (revision 14989) @@ -1,6 +1,6 @@ 'ImageAction', 'OnBeforeDeleteFromLive'=>'ImageAction', 'OnBeforeCopyToLive'=>'ImageAction', @@ -44,14 +59,15 @@ } /** - * Get's special of main item for linking with subitem + * Returns special of main item for linking with sub-item * * @param kEvent $event * @return string + * @access protected */ - function getMainSpecial(&$event) + protected function getMainSpecial(kEvent &$event) { - if ($event->Special == 'list' && !$this->Application->isAdmin) { + if ( $event->Special == 'list' && !$this->Application->isAdmin ) { // ListImages aggregated tag uses this special return ''; } @@ -314,32 +330,30 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(&$event) + protected function SetCustomQuery(kEvent &$event) { parent::SetCustomQuery($event); $object =& $event->getObject(); /* @var $object kDBList */ - if (!$this->Application->isAdminUser) { + if ( !$this->Application->isAdminUser ) { $object->addFilter('active', '%1$s.Enabled = 1'); } $product_id = $event->getEventParam('product_id'); - if ($product_id) { + if ( $product_id ) { $object->removeFilter('parent_filter'); $sql = 'SELECT ResourceId - FROM '.$this->Application->getUnitOption('p', 'TableName').' - WHERE ProductId = '.$product_id; - $resource_id = (int) $this->Conn->GetOne($sql); + FROM ' . $this->Application->getUnitOption('p', 'TableName') . ' + WHERE ProductId = ' . $product_id; + $resource_id = (int)$this->Conn->GetOne($sql); - $object->addFilter('product_images', '%1$s.ResourceId = '.$resource_id); + $object->addFilter('product_images', '%1$s.ResourceId = ' . $resource_id); } - /********************************************/ - $search_helper =& $this->Application->recallObject('SearchHelper'); /* @var $search_helper kSearchHelper */