Index: branches/5.2.x/units/product_option_combinations/product_option_combinations_event_handler.php =================================================================== diff -u -N -r14957 -r14986 --- branches/5.2.x/units/product_option_combinations/product_option_combinations_event_handler.php (.../product_option_combinations_event_handler.php) (revision 14957) +++ branches/5.2.x/units/product_option_combinations/product_option_combinations_event_handler.php (.../product_option_combinations_event_handler.php) (revision 14986) @@ -1,6 +1,6 @@ getObject(); - $this->dbBuild($object,$event); + /* @var $object kDBItem */ + $this->dbBuild($object, $event); + $sql = $this->ItemPrepareQuery($event); $sql = $this->Application->ReplaceLanguageTags($sql); $object->setSelectSQL($sql); // 2. loads if allowed - $auto_load = $this->Application->getUnitOption($event->Prefix,'AutoLoad'); - $skip_autload = $event->getEventParam('skip_autoload'); + $auto_load = $this->Application->getUnitOption($event->Prefix, 'AutoLoad'); + $skip_autoload = $event->getEventParam('skip_autoload'); - if($auto_load && !$skip_autload) $this->LoadItem($event); + if ( $auto_load && !$skip_autoload ) { + $this->LoadItem($event); + } $actions =& $this->Application->recallObject('kActions'); - $actions->Set($event->getPrefixSpecial().'_GoTab', ''); + /* @var $actions Params */ - $actions->Set($event->getPrefixSpecial().'_GoId', ''); + $actions->Set($event->getPrefixSpecial() . '_GoTab', ''); + $actions->Set($event->getPrefixSpecial() . '_GoId', ''); } /** @@ -259,7 +266,7 @@ * @return void * @access protected */ - protected function LoadItem(&$event) + protected function LoadItem(kEvent &$event) { $object =& $event->getObject(); /* @var $object kDBItem */ @@ -269,7 +276,7 @@ if ( !$id ) { $event->CallSubEvent('OnNew'); - return ; + return; } if ( $object->Load($id) ) { @@ -281,21 +288,24 @@ } /** - * 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) { $special = $event->getEventParam('main_special'); - if($special === false || $special == '$main_special') - { + + if ( $special === false || $special == '$main_special' ) { $special = $event->Special; } - if ($special == 'grid') { + + if ( $special == 'grid' ) { $special = ''; } + return $special; }