Index: branches/5.3.x/core/units/favorites/favorites_eh.php =================================================================== diff -u -r15698 -r16519 --- branches/5.3.x/core/units/favorites/favorites_eh.php (.../favorites_eh.php) (revision 15698) +++ branches/5.3.x/core/units/favorites/favorites_eh.php (.../favorites_eh.php) (revision 16519) @@ -1,6 +1,6 @@ getUnitConfig(); $parent_prefix = $config->getParentPrefix(); + /** @var kDBItem $parent_object */ $parent_object = $this->Application->recallObject($parent_prefix); - /* @var $parent_object kDBItem */ if ( !$parent_object->isLoaded() || !$this->Application->CheckPermission('FAVORITES', 0, $parent_object->GetDBField('ParentPath')) ) { $event->status = kEvent::erPERM_FAIL; @@ -59,8 +59,8 @@ WHERE (PortalUserId = ' . $user_id . ') AND (ResourceId = ' . $parent_object->GetDBField('ResourceId') . ')'; $favorite_id = $this->Conn->GetOne($sql); + /** @var kDBItem $object */ $object = $event->getObject(Array ('skip_autoload' => true)); - /* @var $object kDBItem */ if ( $favorite_id ) { $object->Delete($favorite_id); @@ -83,16 +83,16 @@ { parent::OnBeforeItemCreate($event); + /** @var kDBItem $object */ $object = $event->getObject(); - /* @var $object kDBItem */ $user_id = $this->Application->RecallVar('user_id'); $object->SetDBField('PortalUserId', $user_id); $parent_prefix = $event->getUnitConfig()->getParentPrefix(); + /** @var kDBItem $parent_object */ $parent_object = $this->Application->recallObject($parent_prefix); - /* @var $parent_object kDBItem */ $object->SetDBField('ResourceId', $parent_object->GetDBField('ResourceId')); $object->SetDBField('ItemTypeId', $this->Application->getUnitConfig($parent_prefix)->getItemType()); @@ -113,4 +113,4 @@ $this->Conn->Query($sql); } -} \ No newline at end of file +}