class IcewindDaleRP_IcewindDale_ControllerPublic_Inventory extends XenForo_ControllerPublic_Abstract
{
public function actionItemInfo()
{
$itemId = $this->_input->filterSingle('item_id', XenForo_Input::UINT);
$charId = $this->_input->filterSingle('char_id', XenForo_Input::UINT);
$visitorId = XenForo_Visitor::getUserId();
if ($visitorId != $charId)
{
throw $this->responseException($this->responseError(new XenForo_Phrase(
'iwd_cheaters_dont_prosper'), 404)
);
}
$item = $this->_getShopsModel()->getShopItemById($itemId);
more code...
$viewParams = array(
'user_id' => $charId,
'item' => $item
);
return $this->responseView(
'IcewindDaleRP_IcewindDale_ViewPublic_Iwd_Char_Record_Item_Info',
'iwd_char_record_item_info',
$viewParams
);
}